Matt, I have done a variant of what you suggested (thank you very much for the hint!), using the onResult with a delegate, and it works as I would expect.
I am reading chapter 20 now to see if there are even better ways to achieve what I'm after. Thanks again! --- In [email protected], Matt Chotin <[EMAIL PROTECTED]> wrote: > Ah, scoping issues :-) > > > > You're using the onResult function which makes me think you've used Flash > Remoting in the past. We do not tend to use onResult in Flex because it can > interfere with the way Flex manages RemoteObject calls. If you want to > attach a function to an individual call and not use the <mx:RemoteObject > result="myFunc()" /> technique you can do something like this: > > > > <mx:RemoteObject id="ro" result="event.call.resultFunc(event)" .../> > > > > var call = ro.myFunc(); > > call.resultFunc = mx.utils.Delegate.create(this, myResultFunc); > > > > The Delegate is what makes sure that your myResultFunc executes in the right > context. > > Check out the Flex J2EE chapter by Steven and Ali to get a real sense of an > architecture that takes these ideas into account. > > http://www.theserverside.com/articles/content/Flex/Flex_Chapter20.pdf > <http://www.theserverside.com/articles/content/Flex/Flex_Chapter20.pdf> > > > > Matt

