Serialization requires that the constructor handle zero parameters. So just
try:
public function DataList(name:String = null)
Alex Harui
Flex SDK Developer
Adobe Systems Inc.<http://www.adobe.com/>
Blog: http://blogs.adobe.com/aharui
From: [email protected] [mailto:[email protected]] On Behalf
Of flexaustin
Sent: Friday, October 30, 2009 11:42 AM
To: [email protected]
Subject: [flexcoders] Re: bytearray.readObject doesn't convert my objects back
I don't think so. Its just that it isn't just a generic simple Object or Array
but rather a large Class file which contains other large class files.
So imagine saving something like your entire displaylist, but not the visual
just the data behind it.
The object I am saving cotains over 100 over objects and these 100 objects
contains a handful of objects.
Jason
--- In [email protected]<mailto:flexcoders%40yahoogroups.com>,
"seanmcmonahan" <s...@...> wrote:
>
> Do you think the class being dynamic is causing this issue? I ask because I
> have a similar problem with a dynamic class that extends Dictionary. It works
> fine in Flash Player 9.0.28 but not in 10.
>
> --- In [email protected]<mailto:flexcoders%40yahoogroups.com>, Alex
> Harui <aharui@> wrote:
> >
> > Yeah, I think that's because Proxy is an odd beast. It is dynamic and can
> > have "any" property and you're responsible for implementing all those
> > methods that help iterate the object.
> >
> > Alex Harui
> > Flex SDK Developer
> > Adobe Systems Inc.<http://www.adobe.com/>
> > Blog: http://blogs.adobe.com/aharui
> >
> > From: [email protected]<mailto:flexcoders%40yahoogroups.com>
> > [mailto:[email protected]<mailto:flexcoders%40yahoogroups.com>] On
> > Behalf Of flexaustin
> > Sent: Friday, October 30, 2009 9:40 AM
> > To: [email protected]<mailto:flexcoders%40yahoogroups.com>
> > Subject: [flexcoders] Re: bytearray.readObject doesn't convert my objects
> > back
> >
> >
> >
> >
> > Can't even use an JSON encoding
> >
> > at com.adobe.serialization.json::JSONEncoder/objectToString()
> >
> > jason
> >
> > --- In
> > [email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>,
> > "flexaustin" <flexaustin@> wrote:
> > >
> > > What about using the JSONEncoder and JSONDecoder? Will I have the same
> > > issue?
> > >
> > > Jason
> > >
> > >
> > >
> > > --- In
> > > [email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>,
> > > "flexaustin" <flexaustin@> wrote:
> > > >
> > > > Just realized need return type.
> > > >
> > > >
> > > > --- In
> > > > [email protected]<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>,
> > > > "flexaustin" <flexaustin@> wrote:
> > > > >
> > > > > Getting error
> > > > > 1144: Interface method readExternal in namespace
> > > > > flash.utils:IExternalizable is implemented with an incompatible
> > > > > signature
> > > > >
> > > > >
> > > > > public class Data extends EventDispatcher implements IExternalizable
> > > > >
> > > > > public function writeExternal(output:IDataOutput) {
> > > > > output.writeObject(_nodes);
> > > > > output.writeObject(_edges);
> > > > > output.writeObject(_span);
> > > > > output.writeObject(_groups);
> > > > > output.writeObject(_root);
> > > > > output.writeObject(_tree);
> > > > > }
> > > > > public function readExternal(input:IDataInput) {
> > > > > _nodes = input.readObject();
> > > > > _edges = input.readObject();
> > > > > _span = input.readObject();
> > > > > _groups = input.readObject();
> > > > > _root = input.readObject();
> > > > > _tree = input.readObject();
> > > > > }
> > > > >
> > > >
> > >
> >
>