[squeak-dev] Environments question Binding>>objectForDataStream:

Colin Putney colin at wiresong.com
Tue Apr 1 14:02:37 UTC 2014


On Tue, Apr 1, 2014 at 6:49 AM, David T. Lewis <lewis at mail.msen.com> wrote:

> Currently we have this:
>
> Binding>>objectForDataStream: refStream
>         "It's not yet clear how serialization should work in the presence
> of environments"
>         self shouldBeImplemented.
>
> A Binding seems to be a simple object. Does it really need special handling
> when serializing?
>

It does. If you write a binding out to disk and then read it back in, you
should have the same instance you started with, and not a copy. That part
is fairly straight-forward: we include just the key in the data stream, and
then when reading it back in we fetch the binding using the key.

For now, the simple thing is just to use "Environment current" when we need
to lookup a binding. At some point we'll need a way to specify which
environment to use when reading objects from disk, but that needn't stand
in the way of getting this working again.

Colin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140401/2653a00f/attachment.htm


More information about the Squeak-dev mailing list