I am trying to get the following working: We are using remote objects to get/save data. When server session expires the user gets a prompt to relogin. After that I am issuing the following command: lastServerRequest.currentTarget.invokeService(lastServerRequest.currentTarget.request); where lastServerRequest is RemoteServiceEvent. It does work but I am having a problem with calling a callback function when it was specified. Any idea?
I'm not entirely sure what your trying to do there, but it sounds like you want to recall the failed service method after the user has logged back in. For this I would implement some kind of Command Pattern. Basically it just means that instead of calling a method, you put all the info in a single class that has some kind of execute() method. This allows you to store the object instance and invoke the "command" at a time of your choosing.
//code may contain typos
public class DoStuffCommand
public var foo:String;
public var bar:String;
public function execute():void
var ro:RemoteObject = new RemoteObject("my-destination");
var token:AsynToken = ro.doStuff(this.foo, this.bar);
token.addResponder( new Responder(this.resultHandler, this.faultHandler));
This concept should be tailored for your specific use case. More info is needed to provide any specific advice.