| Author |
why to send generated Event Object to the EventListener ??
|
Ravi Kiran Va
Ranch Hand
Joined: Apr 18, 2009
Posts: 2234
|
|
Hi
Please let me know what is the need for sending EventObject to the event Handler ?
For example if we select an Item inside a Combobox an ItemEvent will be generated , and we generally pass this event
to the Event Listener .
<mx:combobox id="combo" change = "calllistener(event)"/>
Please share your ideas .
|
Save India From Corruption - Anna Hazare.
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
How does your event handler know anything about the event (other than its type) otherwise?
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
Ravi Kiran Va
Ranch Hand
Joined: Apr 18, 2009
Posts: 2234
|
|
Thanks , when i read about result , target and currentTarget i could know Events Object usage .
|
 |
Hongli Li
Ranch Hand
Joined: Oct 29, 2006
Posts: 124
|
|
|
when you want to carry additional information,you will carry those data with an eventoject, usually a customized eventObject, this is a great way of decoupling your application.
|
Do you know why this cup is useful? Because it is empty.
|
 |
Ravi Kiran Va
Ranch Hand
Joined: Apr 18, 2009
Posts: 2234
|
|
Thanks Hongli for the additional information .
usually a customized eventObject
But can you please tell me how will you suppourt this and how this will work ??
Thanks in advance.
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
You:
Write a custom event classWrite code that can trigger this eventWrite and register an event handler for the event
|
 |
 |
|
|
subject: why to send generated Event Object to the EventListener ??
|
|
|