aspose file tools*
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 Soft Skills this week in the Jobs Discussion 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need some help in understanding Capturing Phase .