Hi list,

I'm running into some weird serializing behavior.
Please check this class:

package sampleobjects
{
    import flash.utils.IDataInput;
    import flash.utils.IDataOutput;
    import flash.utils.IExternalizable;

    /**
     * Simple object with default constructor, one private
     */
    public class Object6 implements IExternalizable
    {
        private var property1:String = null;

        public function Object6 (pProperty1:String = null)
        {
            property1 = pProperty1;
        }

        /* INTERFACE flash.utils.IExternalizable */

        public function writeExternal(output:IDataOutput):void
        {
            trace ("Writing object 6");
            output.writeObject (property1);
        }

        public function readExternal(input:IDataInput):void
        {
            trace ("Reading object 6");
            property1 = input.readObject();
        }

    }

}

If I serialize this class in a sharedobject, "writing object 6" is printed twice.
If I make the property1 an integer, it is only printed once.

Seems the flash player is doing the output twice for anything more than literal fields, did anyone run into that before?

tnx
JC

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to