my dog learned polymorphism*
The moose likes Flex and the fly likes Need some help in understanding Capturing Phase . Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Flex
Bookmark "Need some help in understanding Capturing Phase ." Watch "Need some help in understanding Capturing Phase ." New topic
Author

Need some help in understanding Capturing Phase .

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi ,


I have some confusion in understanding Capturing Phase .

I have described a scenario below , please let me know will this be an example for Capturing Phase ??


Assume i have a Form containing a Button inside a Application Container .
When the Button is clicked on the Form , if i add a Event Listener using this.addEventListener(MouseEvent.click , callMe)

Will this be an exmple of an Capturing Phase ??


Please guide me

Save India From Corruption - Anna Hazare.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

No. The capturing phase occurs when the event is fired, regardless of whether you have attached an event listener. The capturing phase is when the player examines the target and it ancestors to see if there are listeners available for an ever of this type. If you want to watch it happein, stick a break point in your code and step through te calls.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234


Paul Thanks for the prompt reply ,

Sorry for not posting the full code , i am assuming that the User has clicked a Button and button has a Event Listener in which it will dispatchEvent(new MouseEvent(MouseEvent.CLICK))
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Why would you attach an event listener to dispatch the same event it listens for?
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

You are right as the Flex Framework will do this job .

Thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Need some help in understanding Capturing Phase .
 
Similar Threads
Handling list of newly added rows on client side
how to capture a radio button value
from is getting submitted when 'Refresh' button is clicked
form is getting submitted when 'Refresh' button on the browser is clicked.
Render Response phase is not getting invoked