Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Extending remoteobject

asyncster
Level 1
Level 1
I'd like to have a custom remoteobject for specific error
handling and logging. However, if I try to extend remoteobject:



public dynamic class CustomRemoteObject extends RemoteObject

{

...

}



It is completely unusable in an mxml file. If I try to
declare any <mx:methods> inside of it, I get a "could not
resolve <mx:method> to a component implemenation":



<components:CustomRemoteObject>

<mx:method ...> <!-- compiler error>

</components:CustomRemoteObject>



I know that <mx:method> is special-cased by the
compiler because it doesn't have a component implementation. Is
there a way to use custom remote objects in mxml with the mx:method
tag? If not, is there a way to use custom remote objects in mxml
and have callbacks at the method-level? Is remoteobject not
supposed to be extended this way?



2 Replies
SujitG
Level 2
Level 2
Hi,



From top of my mind, did you extend
mx.rpc.remoting.mxml.RemoteObject or mx.rpc.remoting.RemoteObject



Try extending the mx.rpc.remoting.mxml.RemoteObject.



Hope this helps.
asyncster
Level 1
Level 1
Yeah, I extend mx.rpc.remoting.mxml.remoteObject. I logged a
bug at
http://bugs.adobe.com/jira/browse/SDK-15997.
For some reason it was resolved as not a bug, which (in my humble
opinion) is a mistake. It is a huge pain for us, and most likely
for people using a significant number of remote objects in their
code.