gzz-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gzz] Serializing enfilades


From: Tuomas Lukka
Subject: Re: [Gzz] Serializing enfilades
Date: Sat, 27 Jul 2002 00:13:51 +0300
User-agent: Mutt/1.4i

> Enfilade1Ds implement java.io.Serializable, and thus it should be possible
> to save them through Java serialization. Anybody noticed this is not the case?
> Reason is that they contain Span objects. First thing is that Spans do not
> implement Serializable-- dunno whether Java will complain about this; second
> and more important thing is that we need to save the scrollblocks before we
> can serialize spans.

Ouch. That was a gaping flaw in my plan ;)

> I have no idea how this should work. I'm inclined to think it might be
> better to have a save() method in Enfilade1D that would save the scrollblocks 
> and
> return a serializable representation of the enfilade (would have to have a
> corresponding load() in Enfilade1D.Maker).
> 
> Saving the scrollblocks should be an explicit action, IMHO-- serializing a
> serializable object IMO doesn't qualify for that (I'd expect it not to modify
> any system state).
> 
> So what do we do?

The point of Enfilade1D being serializable is that you can then use it
with the deltas transparently, without having all these horrible
save and load methods everywhere.

Maybe we should look at this from another angle: how about a transient
text scroll that can at any time be asked for a permanent address, at 
which point it syncs? I think that syncing when serializing an enfilade
would not be too bad...

Or we could have a global synchScrolls method after which serializing
enfilades would work, otherwise you'd get exceptions.

        Tuomas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]