ok, well that explains that part, however either my event is not added, or my event handler is never called. My trace statements never show up....

So I guess I  still am wondering if anyone has any ideas....

dnk



On 23-May-08, at 4:56 AM, Paul Andrews wrote:

addEventListener() does not return a value..

----- Original Message -----
From: "dnk" <[EMAIL PROTECTED]>
To: <flexcoders@yahoogroups.com>
Sent: Friday, May 23, 2008 12:47 PM
Subject: [flexcoders] custom event not added

> Hi there,
>
> I have a controller that is adding my custom event listeners, but for
> some reason my event handler was not being fired.
>
> My original code was (snippet):
>
>
> (in controler)
>
> //constructor
> public function FlexbController()
> {
> //turn the key, start it up....
> addEventListener( FlexEvent.CREATION_COMPLETE, onInit );
> }
>
> private function onInit( event:Event ):void
> {
> //setup event listeners
> /*systemManager is where event listener hangs out defines the
> relationship between event and handler*/
>
> systemManager.addEventListener( GetNewsEvent.GET_NEWS_EVENT,
> handler_GetNewsEvent );
> systemManager.addEventListener( AddNewsEvent.ADD_NEWS_EVENT,
> handler_AddNewsEvent );
>
> systemManager.addEventListener( NewsDataLoadedEvent.NEWS_LOADED_EVENT,
> handler_NewsLoadedEvent );
> getNewsData();
>
> }
>
> And I had trace statements in all of my handlers... this is how i
> noticed things were not working as they should.
>
> SO I added a simple check like (in my FlexbController constructor):
>
> if (systemManager.addEventListener( GetNewsEvent.GET_NEWS_EVENT,
> handler_GetNewsEvent ))
> {
> trace("true");
> } else {
> trace("false");
> }
>
>
> And I obviously am getting "false".
>
> Ideas?
>
> dnk
>
>
>
> ------------------------------------
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/ flexcodersFAQ.txt
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
> Links
>
>
>
>




Reply via email to