[Flashcoders] Question on removeEventListener and Delegate callback

2007-05-08 Thread Jiri Heitlager | dadata.org
Hello List, I was wondering if I am doing something correctly when adding listeners to objects. My question is, if I remove the listener is the code below then the right way. Do I use the Proxy class (or mx.utils.Delegate) also when I remove the listener?? //adding a listener

[Flashcoders] Question on removeEventListener and Delegate callback

2007-05-08 Thread Jiri Heitlager | dadata.org
I was wondering if I am doing something correctly when adding listeners to objects. My question is, if I remove the listener is the code below then the right way. Do I use the Proxy class (or mx.utils.Delegate) also when I remove the listener?? //adding a listener

Re: [Flashcoders] Question on removeEventListener and Delegate callback

2007-05-08 Thread R�kos Attila
Why do you post the same question 4 times and with two different subjects? I (and others) already answered your question yesterday. Attila ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive:

[Flashcoders] Question on removeEventListener and Delegate callback

2007-05-07 Thread Jiri Heitlager | dadata.org
I was wondering if I am doing something correctly when adding listeners to objects. My question is, if I remove the listener is the code below then the right way. Do I use the Proxy class (or mx.utils.Delegate) also when I remove the listener?? //adding a listener

Re: [Flashcoders] Question on removeEventListener and Delegate callback

2007-05-07 Thread R�kos Attila
I don't know what does your utils.Proxy.create() method do exactly, but mx.utils.Delegate.create() always returns a new Function instance, thus it cannot be used directly in removeEventListener() calls. Store the function reference passed to addEventListener and use it in removeEventListener(),

Re: [Flashcoders] Question on removeEventListener and Delegate callback

2007-05-07 Thread eka
Hello :) use a variable to register your virtual proxy function : var listener = utils.Proxy.create(this , onBlockContentDestoyed , 'text ' , url) ; this.currentDisplayObject.addEventListener('onContentCleared' , listener ) ; //removing it