[flexcoders] Re: removeEventHandler

2007-12-22 Thread m.frigge
Since you guys are already talking about removing event Handler I
didn't want to create a new post. 

My Problem is that the event Handler doesn't get removed. I have a
service that reads an xml file and in some cases i need to cancel it.
So i did this:

getMailService.removeEventListener(ResultEvent.RESULT,
getMailResultHandler);
getMailService.cancel();

But the ResultEvent still gets fired.. I can't remove it??

Any ideas?

Cheers, Max

--- In flexcoders@yahoogroups.com, mark goldin <[EMAIL PROTECTED]>
wrote:
>
> What I am trying to do is to have a generic Save button that will
save data to the server. So, when a module is loaded it attaches its
own handler with a logic specific to that module. Next module will
atach another save handle, so I thought it would have been a good idea
to remove previous handler.
> 
> rueter007 <[EMAIL PROTECTED]> wrote:  I dont think so. because
the same handler can be used for different
> kinds of events, you need to specify which one to remove.
> 
> --- In flexcoders@yahoogroups.com, "markgoldin_2000"
>  wrote:
> >
> > In order to remove an event handler I have to provide two parameters:
> > Event name and a name of an event handler. Can I remove the handler 
> > without specifying its name?
> > 
> > Thanks
> >
>




Re: [flexcoders] Re: removeEventHandler

2007-12-21 Thread mark goldin
What I am trying to do is to have a generic Save button that will save data to 
the server. So, when a module is loaded it attaches its own handler with a 
logic specific to that module. Next module will atach another save handle, so I 
thought it would have been a good idea to remove previous handler.

rueter007 <[EMAIL PROTECTED]> wrote:  I dont think so. because the same 
handler can be used for different
kinds of events, you need to specify which one to remove.

--- In flexcoders@yahoogroups.com, "markgoldin_2000"
<[EMAIL PROTECTED]> wrote:
>
> In order to remove an event handler I have to provide two parameters:
> Event name and a name of an event handler. Can I remove the handler 
> without specifying its name?
> 
> Thanks
>



 


[flexcoders] Re: removeEventHandler

2007-12-21 Thread rueter007
I dont think so. because the same handler can be used for different
kinds of events, you need to specify which one to remove.

--- In flexcoders@yahoogroups.com, "markgoldin_2000"
<[EMAIL PROTECTED]> wrote:
>
> In order to remove an event handler I have to provide two parameters:
> Event name and a name of an event handler. Can I remove the handler 
> without specifying its name?
> 
> Thanks
>