|
There's more documentation (including a link to the ACT pattern which this is a version of) in the Flex docs. Search for ACT and you'll get a section called Handling asynchronous calls to data services.
Glad you found this easy to use.
Matt
-----Original Message-----
I shouldn't have been so whiney, this turned out to be easier than I thought, doing just what I said below, using an array to track completion of a queue of external calls.
The event.call token/dynamic property technique is hugely powerful. Strangely, I can't seem to get an uncorrupted copy of the Chapter 20 pdf. I'll keep trying.
Thanks for the help! Tracy
From: Tracy
Spratt [mailto:[EMAIL PROTECTED]
My service event handler is working fine, using event.call properties to send the result to the correct component instance.
But I have a procedural path that tries to use the returned data before it arrives. Essentially I am building an array of data from several sources, that may or may not be external
If I can't do a wait or sleep or pause, I will have to do detect if there are any external servicecalls, request them first, storing an array of requests somewhere, decrementing the array when each data call returns, and finally doing my local processing when all the calls are returned. Plus I want them in the order I request them. Yikes! Well if it was easy, I wouldn't be making the big bucks!
Thanks, Tracy
From: Matt
Chotin [mailto:[EMAIL PROTECTED]
Hi,
The Flash Player doesn't support a threading model like you're looking for. There is only one thread for ActionScript code. So if the processing you're talking about is on the server what you'll do is call your service, then place any code that depends on that service having completed in some function that will be called by your service's result handler. You can also put up a shim to block all user-interaction in the meantime if the busy cursor isn't enough. I think we have an example of that in our extras folder.
Matt
-----Original Message-----
I'd
like to set up a loop that will block current processing until
|
- RE: [flexcoders] "wait loop" ...... event.call is A... Tracy Spratt
- Matt Chotin

