I guess I could use convertParametersHandler and convertResultHandler on RemoteObject to set a flag to true/false... anything a little 'cleaner'?
I'm also looking for an answer, it would be nice to display a progress bar while the data is loading.
Maybe it should become a feature request.
I'm pretty sure you can fire off several remoteobject calls, even before the
first one returns. I don't see any APIs to tell you that all pending calls
have returned. I'd probably just keep a counter that goes up when you make
a call and goes down when there is a result or failure event. It looks like
you can also watch the AsyncToken.result, but I think if there is a failure,
it will never get set.
You can set off several calls at once, if the concurrency flag on the RemoteObject is set up to allow it. If you set the concurrency to "single" (see ASDocs for RemoteObject) however you can't, so it makes sense to have a flag variable to bind to for things like disabling buttons or UI controls. Rather than letting the user hit a button twice and have the RO throw up a fault (as the docs say will happen), it'd be nice to just disable the button entirely while a status message is displayed alongside.
Basically what I do now is set a "requestPending" boolean to true whenever a call is made, and set the flag back to false whenever a handler/fault function is called in response. It'd be nice to have this be automatic so you don't need to do it for every single call. Having a shared fault handler function helps, but you still have to remember to deal with the flag in the call and the regular handler for every remote method.