Yep, Tracy your code looked right.

 

Matt

 

-----Original Message-----
From: Tracy Spratt [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 03, 2004 2:39 PM
To: [email protected]
Subject: RE: [flexcoders] Event troubleshooting 101 (remedial?)

 

Thanks, Clint.

 

I did something else that made it work, I'm not sure what. 

 

I think my line was right; the addListener needs to be called on the object that will be emitting the events, and in my case, it was the oData component (myData) that was doing that.

 

It is odd how this happens; I have been fighting with this all day, and finally gave in and asked for help, and minutes later my code starts working!

 

Thanks again!

 


From: Clint Modien [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 03, 2004 4:34 PM
To: [email protected]
Subject: RE: [flexcoders] Event troubleshooting 101 (remedial?)

 

this line...

 

myData.addEventListener("datachange",Delegate.create(this,handleEvt)

 

should be

 

this.addEventListener("datachange",Delegate.create(this,handleEvt);

 

if this doesn't solve the problem.. can you please provide more code..

 

thanks

 

Clint Modien

 


From: nts333rd [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 03, 2004 2:17 PM
To: [email protected]
Subject: [flexcoders] Event troubleshooting 101 (remedial?)

 

This is my first event implementation so be gentle.

An custom component, "oData"  uses a mixin of EventDispatcher (is
this mixin stuff really necessary?) to get dispatchEvent and
addEventListener methods. The metadata directives are there for the
custom event, "datachange".

A ui component, "extendedCombo" has a property, "myData", set in the
mxml with myData="{oData}", and on initialize, calls
myData.addEventListener("datachange",Delegate.create(this,handleEvt)
and handleEvent is a function in extendedCombo.

Everything seems to work correctly, I can trace the addEvent.. to see
it is incrementing a queue, and I can trace the dispatchEvent to see
that it is broadcasting the event.

But the queue is null on the dispatchEvent side, and handleEvt never
gets called.

How can I troubleshoot this?  What might be wrong?

 



Reply via email to