5:42 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: How to asynchronously dispatch an event
Thanks for the guidance, and apologies if I am asking very newbie
questions.
While I have a decent Java background, I do have a lot of new flex/flash
things to try and get a grip
The assignment to result.myData happens before the data service call is
invoked, and this will work fine. I believe that call does not happen
until the next frame.
Yes, exactly. Now the point is (or was really) that I wanted to
implement the same api interaction when model.doAction is not
Ok, I have never really used AsyncToken so I don't really understand
the benefits to it. But what would you add to it that would be of any
use? Could you not just have an object you pass in the doAction
function that is added to the token?
That would probably work just as well I guess. I am
Thanks for your reply Mark
Why would it matter for the API whether or not event dispatching was
asynchronous? Clients still listen for events and hear them; the only
difference would be that the stack would get taller on the sync calls.
The main reason is that I want to give the user of the
You can do this with a timer. There is also an undocumented
unsupported class in the rpc package that does this as well, but,
*use it at your own risk*
import mx.rpc.AsyncDispatcher;
new AsyncDispatcher(myEventDispatchMethod, [myEvent], 10);
It basically takes a method closure and a list of
I think doLater is called callLater in AS3 (at least, I see that func
occasionally in other people's code).
Troy.
On 3/23/07, jason_williams_mm [EMAIL PROTECTED] wrote:
You can do this with a timer. There is also an undocumented
unsupported class in the rpc package that does this as well,
and then removes itself.
From: pgp.coppens [EMAIL PROTECTED]
Date: 2007/03/23 Fri AM 10:54:28 CST
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How to asynchronously dispatch an event
Thanks for your reply Mark
Why would it matter for the API whether or not event
Thanks for the guidance, and apologies if I am asking very newbie questions.
While I have a decent Java background, I do have a lot of new flex/flash
things to try and get a grip on.
I don't see why you can't use the equivalent of an AsyncToken in a sync
call if you really want to. I don't
Ok, I have never really used AsyncToken so I don't really understand
the benefits to it. But what would you add to it that would be of any
use? Could you not just have an object you pass in the doAction
function that is added to the token? I suppose it's all the things I
can't think of that make
9 matches
Mail list logo