Hi,
i’m testing LCCS for my new app and I have a problem using a SharedCollection:
i’m adding to it custom objects and when i get it, i’m unable to cast them. I receive an "Object" typed object and so i can’t use it.
I know I should use [RemoteClass] metatag but it’s not working too.
Any idea?
Thanks
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Raphi,
You might have to explore MessageItem.registerBodyClass API, and also you could check out one of our sample apps that demonstrates how to use the API.
The app could be found in your SDKPath/sampleApps/ComplexObjectTransfer
Thanks
Arun
Views
Replies
Total Likes
Hi Raphi,
You might have to explore MessageItem.registerBodyClass API, and also you could check out one of our sample apps that demonstrates how to use the API.
The app could be found in your SDKPath/sampleApps/ComplexObjectTransfer
Thanks
Arun
Views
Replies
Total Likes
Hi aponnusa,
thanks to MessageItem.registerBodyClass, it's now working !
But I found a strange behaviour / bug :
it's impossible to serialize objects that have a constructor with parameters??
With this object, it doesnt work:
public function VideoVO(author:String, lat:Number, lng:Number)
{
this.author = author;
this.lat = lat;
this.lng = lng;
}
But with an empty parameters constructor, everything's fine !
Is that a bug?
Thanks for your help.
Views
Replies
Total Likes
Ah, this one's a classic AS/Flash Player issue. The AMF serialization
format doesn't provide for classes with required params in the constructor.
To have the best of both worlds, you can make your constructors params
optional with VideoVO(author:String=null, lat:Number = 0,
lng:Number=0):void.
The good news is that any public member variables will be stored at
serialization and applied to the class on deserialization.
hope that helps,
nigel
Ok i didn't know that.
Thanks for the tip !
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies