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