This content has been marked as final. Show 5 replies
I guess maybe what I'm looking for is an event to hook into or a method to override where all remote calls are executed and where our callback handlers are executed. Then I could could keep track of any pending requests and act accordingly. Only problem is, would I be able to get a handle to the application from in the RemoteObject code? I don't know, maybe I'm making it too complicated. Figured I'd ask for some pointers here first before spend half a day going through the flex source code.
What types of remote calls are you doing..?
For something like HTTP Service calls you could just increment a static counter variable each time you make a call (iPendingCalls ++) and then in the event handler for the result event decrement iPendingCalls again.
Bind the visibility of a "loading screen" that covers the entire app, to an evaluation of whether iPendingCalls is greater than zero.
(You'd obviously need to make sure any http errors are handled as well in this case.)
hth / Culme
A counter is the way I do it also.
You could always pop up a UIComponent with the popupmanager and have it retain focus of the app. Then when the remote call is done remove the pop up. Kinda like a loading animation...ect.
Thanks everyone. I went with a simple counter. Seems to be fine for my purposes.