Re: [flexcoders] Re: Object.addEventListener vs.. adding them inline via MXML

2007-02-09 Thread Ralf Bokelberg
Hi Gordon, Is this a documented behaviour or just the current implementation? Where can we find the documentation? Cheers Ralf. On 2/9/07, Gordon Smith [EMAIL PROTECTED] wrote: Didn't I read somewhere that the order you add listeners is the order they get dispatched in as3 now?

RE: [flexcoders] Re: Object.addEventListener vs.. adding them inline via MXML

2007-02-09 Thread Gordon Smith
[mailto:[EMAIL PROTECTED] On Behalf Of Ralf Bokelberg Sent: Friday, February 09, 2007 12:53 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Object.addEventListener vs.. adding them inline via MXML Hi Gordon, Is this a documented behaviour or just the current implementation

RE: [flexcoders] Re: Object.addEventListener vs.. adding them inline via MXML

2007-02-09 Thread Francis Cheng
Sent: Friday, February 09, 2007 9:58 AM To: flexcoders@yahoogroups.com Cc: DL-Flash Player IMD Subject: RE: [flexcoders] Re: Object.addEventListener vs.. adding them inline via MXML It should be documented, but I'm not sure that it is. I can't find it in the ASDoc, for example, which doesn't

RE: [flexcoders] Re: Object.addEventListener vs.. adding them inline via MXML

2007-02-09 Thread Gordon Smith
@yahoogroups.com Cc: DL-Flash Player IMD Subject: RE: [flexcoders] Re: Object.addEventListener vs.. adding them inline via MXML It should be documented, but I'm not sure that it is. I can't find it in the ASDoc, for example, which doesn't seem to discuss the case of registering multiple listeners for the same

RE: [flexcoders] Re: Object.addEventListener vs.. adding them inline via MXML

2007-02-08 Thread Mike Anderson
:53 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Object.addEventListener vs.. adding them inline via MXML Nope, I think the second parameter must be a function, trying to pass an array of functions should fail. Also, just a note: it's better practice to not use the string

Re: [flexcoders] Re: Object.addEventListener vs.. adding them inline via MXML

2007-02-08 Thread Ralf Bokelberg
Yes that's possible, but semantically it is slightly different. Inside the binding tag, the sequence of function calls is given by the sequence in your code. If you use mulitple addEventListener calls the sequence is not guaranteed. Another possibility, which maintains the sequence, would be to

Re: [flexcoders] Re: Object.addEventListener vs.. adding them inline via MXML

2007-02-08 Thread Johannes Nel
removing this listener would be tricky however. On 2/8/07, Ralf Bokelberg [EMAIL PROTECTED] wrote: Yes that's possible, but semantically it is slightly different. Inside the binding tag, the sequence of function calls is given by the sequence in your code. If you use mulitple

Re: [flexcoders] Re: Object.addEventListener vs.. adding them inline via MXML

2007-02-08 Thread Michael Schmalle
Ralf, That is an interesting approach. I just have never had the need for something like that.. yet. Didn't I read somewhere that the order you add listeners is the order they get dispatched in as3 now? Plus you can use priorities. PS From an OOP standpoint, I wouldn't do it , I would just

Re: [flexcoders] Re: Object.addEventListener vs.. adding them inline via MXML

2007-02-08 Thread Ralf Bokelberg
Yes Johannes Michael I'm not using it either. I just wanted to show what is possible. Since i don't use code behind, i don't have this kind of problems anyways ;) Cheers, Ralf. On 2/8/07, Michael Schmalle [EMAIL PROTECTED] wrote: Ralf, That is an interesting approach. I just have

RE: [flexcoders] Re: Object.addEventListener vs.. adding them inline via MXML

2007-02-08 Thread Gordon Smith
: Object.addEventListener vs.. adding them inline via MXML Yes Johannes Michael I'm not using it either. I just wanted to show what is possible. Since i don't use code behind, i don't have this kind of problems anyways ;) Cheers, Ralf. On 2/8/07, Michael Schmalle [EMAIL PROTECTED

RE: [flexcoders] Re: Object.addEventListener vs.. adding them inline via MXML

2007-02-07 Thread Mike Anderson
Hey Doug, Well, that's simple enough. Probably so simple, that I simply overlooked doing it that way. Real quick, would it be possible to also do it this way? Object.addEventListener( click, [funct1, funct2, funct3] ); I know I could just try it, but from a methodology point of view, it

Re: [flexcoders] Re: Object.addEventListener vs.. adding them inline via MXML

2007-02-07 Thread Michael Schmalle
Object.addEventListener( click, [funct1, funct2, funct3] ); No, 1. as3 is strongly typed which means the method expects a function when it is getting an array. 2. addEventListener wouldn't even know what to do with an array. You could, if you had your own subclass override addEventListener to

Re: [flexcoders] Re: Object.addEventListener vs.. adding them inline via MXML

2007-02-07 Thread Doug McCune
Nope, I think the second parameter must be a function, trying to pass an array of functions should fail. Also, just a note: it's better practice to not use the string of the event listener like click but rather the variable like MouseEvent.CLICK. They really do the exact same thing in

Re: [flexcoders] Re: Object.addEventListener vs.. adding them inline via MXML

2007-02-07 Thread Michael Schmalle
could be renamed in a future release to something like mouseClick and then your code wouldn't work. Or even worse, you write cllck, and then for days even months, you think your app isn't working or 'works' a certain way. Come to find out the event wasn't even getting captured. :) This is

Re: [flexcoders] Re: Object.addEventListener vs.. adding them inline via MXML

2007-02-07 Thread Doug McCune
Mike, Looks like you're speaking from personal experience :) From now on I'll make my custom components dispatch click and cilck and cllck and clik etc etc. The google suggest approach to event dispatching. Doug Michael Schmalle wrote: could be renamed in a future release to something