There is no straightfoward way to enumerate listeners AFAIK You can still do what you would usually have to do with methods from the IEventDispatcher interface: package flash. Events { public interface IEventDispatcher { function addEventListener(eventName:String, listener:Object, useCapture:Boolean=false, priority:Integer=0, useWeakReference:Boolean=false):Boolean; function removeEventListener(eventName:String, listener:Object, useCapture:Boolean=false):Boolean; function dispatchEvent(eventObject:Event):Boolean; function hasEventListener(eventName:String):Boolean; function willTrigger(eventName:String):Boolean; } } Source of the above code: http://livedocs.adobe.com/flex/3/html/help.html?content=16_Event_handling_6.html.
There is no straightfoward way to enumerate listeners AFAIK. You can still do what you would usually have to do with methods from the IEventDispatcher interface: package flash. Events { public interface IEventDispatcher { function addEventListener(eventName:String, listener:Object, useCapture:Boolean=false, priority:Integer=0, useWeakReference:Boolean=false):Boolean; function removeEventListener(eventName:String, listener:Object, useCapture:Boolean=false):Boolean; function dispatchEvent(eventObject:Event):Boolean; function hasEventListener(eventName:String):Boolean; function willTrigger(eventName:String):Boolean; } } Source of the above code: http://livedocs.adobe.com/flex/3/html/help.html?content=16_Event_handling_6.html.
Also, editing the interface would break the built in player method in playerglobal. Swc – Nate Jul 16 at 15:50 @Nate: yeah, my understanding is that a registered listeners is not meant to be retrieved probably because 1- listeners are not "registered" in a trackable way other then by the address of the method that gets invoked and 2- such methods can be anonymous. – sixfeetsix Jul 16 at 17:54.
Create a variable on the class called: private var __numListeners:Number=0; then create a set and get method to edit that variable... and each time a listener is added or removed it adjusts that var using that method... this. SetNumListeners(1); or whatever then it can be accessed through a trace(someObject.getNumListeners()).
– URL1 Jul 16 at 13:43 if I am not wrong then the question is asked about the debug mode in flash builder and he wants to trace out the event listener added on component. If it's not useful then sorry for misunderstanding. – Swati Singh Jul 16 at 13:47 2 @SWato Singh The original poster wanted a list of event listeners; true.
But nothing in the original question had anything to do w/ trace statements. I don't understand how enabling / disabling the trace statements could give him the info he wanted.(Unless he explicitly puts a trace statement in every listener). – URL1 Jul 16 at 13:52 @Flextras, you are correct, that was my original requirement.
– Anoop Jul 16 at 14:08 @Anoop sorry for misunderstanding your question. – Swati Singh Jul 16 at 14:16.
There is no quick way to do this without editing all of the components in your app that implement the IEventDispatcher interface. If the player was open source then you could extend the EventDispatcher class to add trace statements into it, but it isn't.
In this section, you import into Flash Builder two Flex projects for an application that draws various shapes as you click and move your mouse. The starting project application does not currently work, the ending project application does. The ending application is for reference.
You will debug the starting application in this series of tutorials. If you have not done so already, download and install Flash Builder 4. If you have not done so already, download the starting files and the solution files and unzip them.
Open Flash Builder. Select File > Import Flex Project (FXP). In the Import Flex Project dialog box, click the Browse button next to File.
In the Open dialog box, browse to where you saved the Flex4DebuggingTutorial_EndProject. Fxp file, select it, and click Open. Back in the Import Flex Project dialog box, click Finish (see Figure 1).
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.