I'm about to implement
public function writeExternal( output:IDataOutput ):void {...}
public function readExternal( input:IDataInput ):void {...}
to make a set of object serializable.
Although I'm pretty sure, that I implemented all correctly, readExternal(..)
at a certain point complains about too few data left to read:
RangeError: Error #2006: The supplied index is out of bounds.
at flash.filesystem::FileStream/readObject()
I wonder, if I have a circular object network like
A = { left -> B, right -> B }
B = { father -> A }
and I call
writeObject( a )
will Flex serialize the hole object network and each object once and only one?
I did this:
- Declared type annotations like this:
[RemoteClass(alias="model.MyClass")]
- Implemented parameter-free constructors
- Declared all classes using
implements IExternalizable
SharedObject's send() method is guaranteed to send each object once and only once.
Additional infos:
Please have a look at this related question.