On 12/20/05, Flapflap <[EMAIL PROTECTED]> wrote:

> I create a simple mxml component based on canvas.
> I got a little script that will set the y and height depends on some
> data injected and of the height of the parent of my component.
> So I create a function in as and call my function on the
> creationComplete event.

> But the event is fire 4 times for each instance !
> And the first event can have the parentDocument.height property, after
> that its a null so the app crash...

I'm not sure I understand the scenario, but "creationComplete" is
triggerred once and exactly once for every UIComponent instance. 
Could it be that you're getting events from child objects as well?  If
that's the case, you could check for the event object's 'target'
property to make sure it refers to the object you're listening for.

 function creationCompleteHandler(event)
 {
   if (event.target == myCanvas) {
    ...
   }
 }

Manish


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income homes are not online. Make a difference this holiday season!
http://us.click.yahoo.com/5UeCyC/BWHMAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to