I am also looking to do the exact same thing - make a more intelligent RemoteObject or Operation so it can better handle errors and logging.
Can someone provide an example on how to properly do this? When you extend the remote object, for each of your remote functions called in your code you get:
Severity and Description Path Resource Location Creation Time Id
1061: Call to a possibly undefined method MyRemoteFunction through a reference with static type widgets:MYCustomRemoteObject.
If you extend method and call it says you're not allowed to do that.
Mxml shouldn't be so magical that I can't figure it out just by glancing at the source code.
This is using Flex Builder 3 with 3.3 SDK.
The key is to define a default property on your RemoteObject to accept your Operation. See the operationList property of mx.rpc.http.HTTPMultiService in the Flex 3.4 SDK for an example of how to do this.
Hi Nathan, I'm stuck on this as well. I looked at the operationList property as you recommend, but I'm not seeing it, in fact, I'm not sure where to begin on this? Could you provide a snippet or some pseudo code. Thanks, --Doug
Hi Doug. Did you look at how the operationList property is implemented in HTTPMultiService? You can see the source here: http://opensource.adobe.com/svn/opensource/flex/sdk/tags/22.214.171.12483/frameworks/projects/r pc/src/mx/rpc/http/HTTPMultiService.as
Basically, you want to do the same thing, except extending RemoteObject.
If you want to see a real world example of this you can look at the RemoteObject and Operation classes of my SwizRPC library here: http://svn.riaforge.org/swizrpc/trunk/src/org/riaforge/swizrpc/rpc/remoting/mxml/
Hope that helps,
Nathan, Thanks a ton for the pointer. I had a quick look at it, but will need to dig in, but will do so. Thanks again, I've been wondering about this for weeks. --Doug
Thanks for this, it helps. I was stuck on the: Could not resolve <mx:method> to a component implementation, but poking through your code, I see the componentPackage in the manifest.xml it makes some sense. In your ref, I could choose to make a custom method.as which extends Operation or figure out the compiler settings. Thanks again.