Looks like the binding for the MyCanvas object is still around. You'll
have to remove the MyCanvas object from the MyComponent object
explicitly. Make sure you've assigned an id to it.

 <MyCanvas myVar="{...}" id="myCanvas" />
 <Script>
  function removeCanvas() {
    removeChild(myCanvas);
    myCanvas = null; // this is important
  }
 </Script>

>From the main code, you have to call removeCanvas() before removing
the MyComponent object from the display list.

On 4/22/07, João <[EMAIL PROTECTED]> wrote:
> I have created a minimal flex app to show the problem. You can access
> it on
> http://www.riapt.org/opensource/removeChildTest/removeChildTest.html.
> The source is available (right click-> view source).
>
> As you can see, after creating, destroying and creating again (by
> pressing twice the first button), if you change the model you can see
> that there is an old reference to the destroyed component.
>
> This is creating me so much trouble.... :|
>
> Thanks,
>
> João Saleiro
>
>
>
> --
> 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
>
>
>
>

Reply via email to