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
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
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
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
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
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.
- Original Message
From: Taka Kojima t...@gigafied.com
To: Flash Coders List flashcoders@chattyfig.figleaf.com
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
...@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 t...@gigafied.com
To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Mon
- Original Message
From: Merrill, Jason jason.merr...@bankofamerica.com
To: Flash Coders List flashcoders@chattyfig.figleaf.com
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
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
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.
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
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
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
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, but
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
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 p...@ipauland.com wrote:
On 27/07/2010 19:37, Henrik Andersson wrote:
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
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
Original Message
From: Henrik Andersson he...@henke37.cjb.net
To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Mon, July 26, 2010 12:06:55 PM
Subject: Re: [Flashcoders] (no subject)
John Singleton wrote:
function RotateGearsLoaded(e:Event):void
Why is
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
21 matches
Mail list logo