Re: [Flashcoders] Listeners (was no subject)

2010-07-28 Thread Juan Pablo Califano
Sigh... Did you actually bother to read what I wrote? >>> But note I made a distinction between the dispatcher - the object that performs the callback, directly or through dispatchEvent - and the code (let's refer to it as the "first caller") that calls the method that contains the dispatcher. >>>

Re: [Flashcoders] Listeners (was no subject)

2010-07-28 Thread Henrik Andersson
The dispatcher is not in your code here. The method does not dispatch the event. It causes it to be dispatched later. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Re: [Flashcoders] Listeners (was no subject)

2010-07-28 Thread Juan Pablo Califano
Maybe you didn't read what I worte carefully or maybe I didn't explain it clearly enough. But note I made a distinction between the dispatcher - the object that performs the callback, directly or through dispatchEvent - and the code (let's refer to it as the "first caller") that calls the method th

Re: [Flashcoders] Listeners (was no subject)

2010-07-28 Thread Henrik Andersson
Juan Pablo Califano wrote: Yes, the dispatcher and the listener are both in the same call stack always, but I think what we were discussing is whether the caller (the original caller, the one that calls the method that will eventually dispatch the event) is in the same callstack as the listener /

Re: [Flashcoders] Listeners (was no subject)

2010-07-28 Thread John Singleton
Hi all; I hesitated to introduce new questions to this list concerning my matter in this same thread since it has taken such interesting turns into quarks and bosons and what not, but then I thought it best if anyone were to google it to be continuous. I am in the process of joining Flash_Tig

Re: [Flashcoders] Listeners (was no subject)

2010-07-28 Thread Juan Pablo Califano
Yes, the dispatcher and the listener are both in the same call stack always, but I think what we were discussing is whether the caller (the original caller, the one that calls the method that will eventually dispatch the event) is in the same callstack as the listener / event handler. That's not al

Re: [Flashcoders] Listeners (was no subject)

2010-07-28 Thread Henrik Andersson
Kerry Thompson wrote: I agree with everything you say, up to that point. There is a fundamental difference in the way callbacks and messages work. A callback puts the caller on the call stack, and control will eventually return to that calling method. A message does not put the sender on the call

Re: [Flashcoders] Listeners (was no subject)

2010-07-27 Thread Juan Pablo Califano
>>> I agree with everything you say, up to that point. There is a fundamental difference in the way callbacks and messages work. A callback puts the caller on the call stack, and control will eventually return to that calling method. A message does not put the sender on the call stack. >>> Well, t

Re: [Flashcoders] Listeners (was no subject)

2010-07-27 Thread Kerry Thompson
Juan Pablo Califano wrote: > I agree on your point of custom events being cleaner and easier to follow. > In a way, it's like using an Object and defining a class. At the end of the day, Events *are* callbacks. There isn't > anything inherintly different in how they work. I agree with everything

Re: [Flashcoders] Listeners (was no subject)

2010-07-27 Thread Juan Pablo Califano
I agree on your point of custom events being cleaner and easier to follow. In a way, it's like using an Object and defining a class. You can get away with both, and both could be fine. Defining a custom class, although it's some more work upfront, pays off in most cases. Maybe I'm spoiled at this p

Re: [Flashcoders] Listeners (was no subject)

2010-07-27 Thread Kerry Thompson
Jason Merrill wrote: > My subforce laser gun got jammed the other day pilferating a modulus > foci target.  Turns out it was the transduced Higgs field regulator > sending anti-photons across the demi filtration shifter the same time > gravitons were reporting dimensional shifts. > > But a rookie

Re: [Flashcoders] Listeners (was no subject)

2010-07-27 Thread Karl DeSaulniers
There is a book called "god particle: If the universe is the answer, what is the question?" Might help.. :) Karl On Jul 27, 2010, at 3:51 PM, Kerry Thompson wrote: Jason Merrill wrote: My subforce laser gun got jammed the other day pilferating a modulus foci target. Turns out it was the

RE: [Flashcoders] Listeners (was no subject)

2010-07-27 Thread Merrill, Jason
>> set to treat it as a scalar elementary particle Ah, that was it, thanks Kerry - I swear, the world is full of idiots. Jason Merrill Instructional Technology Architect Bank of America Global Learning Join the Bank of America Flash Platform Community and visit our Instructional Technolo

RE: [Flashcoders] Listeners (was no subject)

2010-07-27 Thread Merrill, Jason
My subforce laser gun got jammed the other day pilferating a modulus foci target. Turns out it was the transduced Higgs field regulator sending anti-photons across the demi filtration shifter the same time gravitons were reporting dimensional shifts. But a rookie would have just re-modulated th

Re: [Flashcoders] Listeners (was no subject)

2010-07-27 Thread Henrik Andersson
Kerry Thompson wrote: Agreed completely. I've been programming for over 25 years, and I made all the stupid mistakes years ago. My blunders now are more sophisticated ;-) Tell me about it, a few days ago I managed to cause a verify error that did a full dump of the opcodes. And it wasn't dur

Re: [Flashcoders] Listeners (was no subject)

2010-07-27 Thread Kerry Thompson
Henrik Andersson wrote: > That they are. But they are not miracle tool. You should use them wisely and > only when it makes sense. I agree completely. Custom messages are for the intermediate programmer, at least. I wouldn't recommend them for a beginner. On the other hand, I don't think you can

Re: [Flashcoders] Listeners (was no subject)

2010-07-27 Thread Paul Andrews
On 27/07/2010 20:34, Taka Kojima wrote: and you can also do... function onSomeEvent(e:Event = null):void{ } and then just call the function directly, without creating a new Event instance. i.e.: onSomeEvent(); Yes, but I specifically avoid that - I like to separate event handlers and ot

Re: [Flashcoders] Listeners (was no subject)

2010-07-27 Thread Taka Kojima
and you can also do... function onSomeEvent(e:Event = null):void{ } and then just call the function directly, without creating a new Event instance. i.e.: onSomeEvent(); On Tue, Jul 27, 2010 at 12:20 PM, Paul Andrews wrote: > On 27/07/2010 19:37, Henrik Andersson wrote: > >> Paul Andrews wro

Re: [Flashcoders] Listeners (was no subject)

2010-07-27 Thread Kerry Thompson
Jason Merrill wrote: > John - check out Flash_Tiger on Yahoo (it's a mailing list like this one > and also has an online searchable forum) - where any Flash and > Actionscript related question is legit. Second that. Jason, you somehow neglected to mention that you are one of the Flash Tiger moder

RE: [Flashcoders] Listeners (was no subject)

2010-07-27 Thread Merrill, Jason
>>"maybe I should just ignore these types of messages in general and not get myself involved" I'd vote for that one. His questions were legit, he doesn't need condescension no matter how elementary his question seemed. From the perspective of an advanced programmer, they seem very Googleable, bu

Re: [Flashcoders] Listeners (was no subject)

2010-07-27 Thread Paul Andrews
On 27/07/2010 19:37, Henrik Andersson wrote: Paul Andrews wrote: If you try and call a function designed to be an event handler directly, you must create an event object instance to correspond with the event argument yourself when it is called. You must at the very least give the parameter a

Re: [Flashcoders] Listeners (was no subject)

2010-07-27 Thread Taka Kojima
Here's the deal: If you had googled your error message "1046: Type was not found or was not a compile-time constant: Event", you would have found the answer to your first question in the first 3 results. A 1046 error is a very common error message, seasoned developers already know what's wrong be

Re: [Flashcoders] Listeners (was no subject)

2010-07-27 Thread Henrik Andersson
Kerry Thompson wrote: Henrik Andersson wrote: Custom events are usually overkill. If I understand you correctly, Henrik, I disagree. Custom events are incredibly useful. That they are. But they are not miracle tool. You should use them wisely and only when it makes sense. AS3 is event-

Re: [Flashcoders] Listeners (was no subject)

2010-07-27 Thread Henrik Andersson
Paul Andrews wrote: If you try and call a function designed to be an event handler directly, you must create an event object instance to correspond with the event argument yourself when it is called. You must at the very least give the parameter a value. A null reference counts as a value. Yo

Re: [Flashcoders] Listeners (was no subject)

2010-07-27 Thread Kerry Thompson
Henrik Andersson wrote: > Custom events are usually overkill. If I understand you correctly, Henrik, I disagree. Custom events are incredibly useful. AS3 is event-driven, and I routinely have all sorts of custom events. In a recent game, I added event listeners to 7 different custom events in th

Re: [Flashcoders] Listeners (was no subject)

2010-07-27 Thread Paul Andrews
On 27/07/2010 13:45, John Singleton wrote: - Original Message From: Taka Kojima To: Flash Coders List Sent: Mon, July 26, 2010 1:33:43 PM Subject: Re: [Flashcoders] Listeners (was no subject) John, This is going to come across as harsh, however you really should maybe go and

Re: [Flashcoders] Listeners (was no subject)

2010-07-27 Thread Henrik Andersson
Custom events are usually overkill. The issue is not what event, but what the listener knows about the object that it happened to. Most often, the listener can simply access a property of the class that it lies in instead of using some complicated custom event solution. The event object shoul

Re: [Flashcoders] Listeners (was no subject)

2010-07-27 Thread John Singleton
- Original Message > From: "Merrill, Jason" > To: Flash Coders List > Sent: Tue, July 27, 2010 8:23:16 AM > Subject: RE: [Flashcoders] Listeners (was no subject) > > You'll want to learn how to create custom events and pass data with > those.

RE: [Flashcoders] Listeners (was no subject)

2010-07-27 Thread Merrill, Jason
hattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of John Singleton Sent: Tuesday, July 27, 2010 8:45 AM To: Flash Coders List Subject: Re: [Flashcoders] Listeners (was no subject) - Original Message > From: Taka Kojima > To: Flash Coders List

Re: [Flashcoders] Listeners (was no subject)

2010-07-27 Thread John Singleton
- Original Message > From: Taka Kojima > To: Flash Coders List > Sent: Mon, July 26, 2010 1:33:43 PM > Subject: Re: [Flashcoders] Listeners (was no subject) > > John, > > This is going to come across as harsh, however you really should maybe go > and ge

Re: [Flashcoders] Listeners (was no subject)

2010-07-26 Thread Taka Kojima
John, This is going to come across as harsh, however you really should maybe go and get a book on AS3. These problems, forgetting an import, trying to pass arguments to a listener, etc. are pretty rudimentary, and not really the purpose of this list. Taka On Mon, Jul 26, 2010 at 10:58 AM, John

Re: [Flashcoders] Listeners (was no subject)

2010-07-26 Thread John Singleton
Original Message > From: Henrik Andersson > To: Flash Coders List > Sent: Mon, July 26, 2010 12:06:55 PM > Subject: Re: [Flashcoders] (no subject) > > John Singleton wrote: > > function RotateGearsLoaded(e:Event):void > Why is that? I tried to pass that var like this: > >