Project loading in 3.7

goran.krampe at bluefish.se goran.krampe at bluefish.se
Tue Nov 9 19:33:50 UTC 2004


Hi Ned and all!

Ned Konz <ned at squeakland.org> wrote:
> On Tuesday 09 November 2004 2:16 am, goran.krampe at bluefish.se wrote:
> > While on the subject so to speak - I am currently migrating an app from
> > 3.6 to 3.7 that uses ImageSegments for domain model storage. It then
> > appeared to me that ImageSegments saved from 3.6 and loaded into 3.7 get
> > broken Date instances. This is of course not surprising, given the
> > change in representation of Dates.
> >
> > Now... the questions:
> >
> > 1. Should we care to make this work? Is it meant to work? I assume
> > Squeaklanders might want it to work, though they don't use Dates much
> > perhaps in their projects.
> 
> Yes, it should work. The conversion code for SmartRefStream is also called for 
> objects in ImageSegments, because the outPointers array is serialized.

Really? Good.
 
> > 2. How can I fix it? Is there some place to hook in conversion code? I
> > can of course sniff around but perhaps someone can give me a quick hint.
> 
> It is (or should be, anyway) the responsibility of people making changes to 
> classes in the base image which might be in an ImageSegment (which would 
> certainly include Dates) to make conversion methods.
> 
> You may need to provide one or more methods to fix this:
> 
> - convertToCurrentVersion: varDict refStream: smartRefStrm

Yes, I found this and managed to make conversion for Date. Pretty easy
of course.
I will see if I can whip up TimeStamp too and submit later.

Sidenote: I found this by reading the class comment :) of
SmartRefStream.

Thanks for the summary though, you rock Ned! :)

regards, Göran



More information about the Squeak-dev mailing list