I am doing a project using adobe air. It is a client server application where server is in java.
We are using remoting to access server side business.
I have a main class and a helper class.Service is called in a function (say "Search()") in this helper class which is called from the main class.
As usual we have created Remoting object in the helper class and handles result in a resulthandler function which is registered to handle result event in this class.
But we are facing a problem as this is an asynchronous call. As soon as the function in the remoting object is called , control is returned to the calling function in the main class where this function expects a result( may be boolean success or false) from the service call to execute next line. But it gets wrong value as the service call is asynchronous.
How to handle this situation. Any frame work or design pattern to solve this problem