Re: [flexcoders] custom event not added

2008-05-25 Thread dnk
ah. Little slow on this end. I will see if I can get it to work d On 24-May-08, at 6:59 PM, Josh McDonald wrote: As in, I've got no idea what's going on :) Application.application should always point to the running instance of your mx:Application On Sun, May 25, 2008 at 2:19

Re: [flexcoders] custom event not added

2008-05-25 Thread dnk
ok, this is how my app is setup :: app.mxml :: has a: xmlns:controller=Flexb.controller.* controller:FlexbController/ That is how my controller is instantiated. :: FlexbController.as :: public class FlexbController extends UIComponent in my constructor I have: addEventListener(

Re: [flexcoders] custom event not added

2008-05-25 Thread dnk
Josh, FYI, I got around the error, I had to use: mx.core.Application.application.dispatchEvent(new GetNewsEvent(GetNewsEvent.GET_NEWS_EVENT, null, false, false)); But event when targeting in this way as you suggested, it still did not help dispatch the event.. dnk On 23-May-08,

Re: [flexcoders] custom event not added - almost solved.

2008-05-25 Thread dnk
Ok, I might be onto something here I added trace statements in all handlers and contructors, etc And the order my traces come back are: Controller getNewsData onInit The order my traces SHOULD come back are: Controller onInit getNewsData Since my event listeners are setup in my

RE: [flexcoders] custom event not added - almost solved.

2008-05-25 Thread Alex Harui
Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dnk Sent: Sunday, May 25, 2008 11:40 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] custom event not added - almost solved. Ok, I might be onto something here I added trace statements in all handlers

Re: [flexcoders] custom event not added - almost solved.

2008-05-25 Thread dnk
] custom event not added - almost solved. Ok, I might be onto something here I added trace statements in all handlers and contructors, etc And the order my traces come back are: Controller getNewsData onInit The order my traces SHOULD come back are: Controller onInit

Re: [flexcoders] custom event not added - almost solved.

2008-05-25 Thread Josh McDonald
Of dnk Sent: Sunday, May 25, 2008 11:40 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] custom event not added - almost solved. Ok, I might be onto something here I added trace statements in all handlers and contructors, etc And the order my traces come back

Re: [flexcoders] custom event not added - almost solved.

2008-05-25 Thread Josh McDonald
Sent: Sunday, May 25, 2008 11:40 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] custom event not added - almost solved. Ok, I might be onto something here I added trace statements in all handlers and contructors, etc And the order my traces come back

Re: [flexcoders] custom event not added - almost solved.

2008-05-25 Thread Josh McDonald
been sent, that's too late, you need to do it before the request. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dnk Sent: Sunday, May 25, 2008 11:40 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] custom event

Re: [flexcoders] custom event not added - almost solved.

2008-05-25 Thread dnk
AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] custom event not added - almost solved. Ok, I might be onto something here I added trace statements in all handlers and contructors, etc And the order my traces come back are: Controller getNewsData onInit The order

Re: [flexcoders] custom event not added - almost solved.

2008-05-25 Thread Josh McDonald
the request. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dnk Sent: Sunday, May 25, 2008 11:40 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] custom event not added - almost solved. Ok, I might be onto something

Re: [flexcoders] custom event not added - almost solved.

2008-05-25 Thread dnk
To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] custom event not added - almost solved. Ok, I might be onto something here I added trace statements in all handlers and contructors, etc And the order my traces come back are: Controller getNewsData onInit The order my traces

Re: [flexcoders] custom event not added

2008-05-24 Thread dnk
fire? As in scrap and rewrite? dnk On 23-May-08, at 10:25 PM, Josh McDonald wrote: If you're getting a runtime error accessing Application.application you'll need fire to clean this up, methinks. -J On Sat, May 24, 2008 at 3:02 PM, dnk [EMAIL PROTECTED] wrote: That added an error:

Re: [flexcoders] custom event not added

2008-05-24 Thread Josh McDonald
As in, I've got no idea what's going on :) Application.application should always point to the running instance of your mx:Application On Sun, May 25, 2008 at 2:19 AM, dnk [EMAIL PROTECTED] wrote: fire? As in scrap and rewrite? dnk On 23-May-08, at 10:25 PM, Josh McDonald wrote: If

RE: [flexcoders] custom event not added

2008-05-24 Thread Alex Harui
Who's dispatching and how? When does the control get instantiated? Could it be after creationComplete? If the controller is not a UIComponent, it will not get a creationComplete. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of

Re: [flexcoders] custom event not added

2008-05-23 Thread Paul Andrews
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

Re: [flexcoders] custom event not added

2008-05-23 Thread dnk
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

Re: [flexcoders] custom event not added

2008-05-23 Thread Josh McDonald
What's the event dispatch code look like? On Sat, May 24, 2008 at 11:01 AM, dnk [EMAIL PROTECTED] wrote: 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

Re: [flexcoders] custom event not added

2008-05-23 Thread dnk
It is dispatched like this (in function in my controller): dispatchEvent(new GetNewsEvent(GetNewsEvent.GET_NEWS_EVENT, null, false, false)); the null is used for an object (if I need to pass data with my event). In this particular case I did not. My actual event class looks like: package

Re: [flexcoders] custom event not added

2008-05-23 Thread Josh McDonald
The only thing i can think of after looking at that is that your controller (whatever that is) is not part of the display tree? Try replacing dispatchEvent() with Application.application.dispatchEvent() and see if it works then. -J On Sat, May 24, 2008 at 2:28 PM, dnk [EMAIL PROTECTED] wrote:

Re: [flexcoders] custom event not added

2008-05-23 Thread dnk
That added an error: Access of undefined property Application researching that now... d On 23-May-08, at 9:35 PM, Josh McDonald wrote: The only thing i can think of after looking at that is that your controller (whatever that is) is not part of the display tree? Try replacing

Re: [flexcoders] custom event not added

2008-05-23 Thread Josh McDonald
If you're getting a runtime error accessing Application.application you'll need fire to clean this up, methinks. -J On Sat, May 24, 2008 at 3:02 PM, dnk [EMAIL PROTECTED] wrote: That added an error: Access of undefined property Application researching that now... d On 23-May-08, at