I'm trying to understand the environment that a call back function is
executing in.

I have called a remote object from ActionScript, via

var call = remoteObject.myFunc();

Then I set a result handler function on the returned PendingCall instance:

call.onResult = myFunc;

But when myFunc gets invoked, it gets passed in the result of the
remote object method invocation (expected) but does not seem to be
executing in the context of the invoking object, i.e. the value of
"this" is not what was present when I invoked "remoteObject.myFunc()".

I thought about annotating the PendingCall object with "this" in some
random property, but that doesn't help me since when myFunc is invoked
it is not being given the PendingCall instance.

Is there any way to have "myFunc" obtain the correct value for "this"?

Steve



Reply via email to