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 it useful.

Aside from all that, forget about doLater, use callLater, there is
plenty of info on callLater in the help.

Paul

--- In flexcoders@yahoogroups.com, "Peter" <[EMAIL PROTECTED]> wrote:
>
> 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 understand the problem.
> 
> Well, I would like to do something like
> 
>   model.addEventListener("eventType", eventListener);
>   var result:MyAsyncToken = model.doAction(...);
>   result.myData = ....
> 
> Unless I am missing something, the "problem" is that doAction
synchronously
> invokes the eventListener (by invoking dispatchEvent) and therefore the
> value assigned to result.myData never makes it in the eventListener.
>   
> > 
> > There's at least one DoLater.as class floating around in AS2..a
doLater is
> > basically just adding an onEnterFrame to an handy MovieClip that
calls a
> > given method and then removes itself.
> 
> I'll try to find what you refer to. Having no flash experience I
will have
> to do a bit of reading to figure out how all this would match up
with the
> scenario above, but it certainly helps me to find the direction to start
> looking. 
> 
> Much appreciated! 
> 
> Peter
>


Reply via email to