• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need some help in understanding Capturing Phase .

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why would you attach an event listener to dispatch the same event it listens for?
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are right as the Flex Framework will do this job .

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic