[squeak-dev] MorphicProject subclass: #EtoysProject

Bert Freudenberg bert at freudenbergs.de
Tue Oct 10 16:19:02 UTC 2017

On Sat, Oct 7, 2017 at 2:17 AM, David T. Lewis <lewis at mail.msen.com> wrote:

> On Fri, Oct 06, 2017 at 03:48:56PM +0200, Bert Freudenberg wrote:
> > It's all class-based. E.g. if the shape of a class changed (new / renamed
> > inst vars) that class can provide a "conversion method" that creates an
> > instance with the new layout from the old inst vars (that are loaded as a
> > dictionary). There still is a preference (conversionMethodsAtFileOut)
> that
> > used to prompt people to provide these conversion methods when they
> changed
> > a class. But it didn't survive the transition to Monticello, we now have
> to
> > remember to write conversion methods for instances that may be stored in
> a
> > project.
> To check my understanding, the "conversion method" might be something like
> #storeDataOn: and #readDataFrom:size: like what I described for
> DateAndTime,
> is that right?

​No, it's those weirdly-named methods like Hannes just made
in Morphic-hjh.1349.mcz. The store / read methods aren't used per-object. This
would have been too expensive back in the interpreter days on slow CPUs,
that's why the project is stored as an image-segment, and the segment is
written to a SmartRefStream with its out-pointers (references to objects
outside the segment, e.g. classes).

The SmartRefStream is only used to resolve the class references from the
ImageSegment that stores the project.

> This is different from the Etoys home screen (the clouds and drive-a-car)
> > which is simply a project that would be loaded by the deployment script
> > that creates an Etoys image. It does not have to ship with the general
> > Squeak image.
> I do not know if it will make sense, but I guess my mental image is an
> Etoys "deployed image" hosted inside my regular Squeak trunk image. So I
> guess that I am thinking of the "clouds and drive-a-car" project being
> loaded the first time that I create a new EtoysProject from normal Squeak,
> and that somehow the subsequent project navigation within that new "hosted"
> Etoys would behave is if I were in a stand-alone Etoys image. Finally,
> I would want to be able to escape back to my normal Squeak.

​That sounds good :)

- Bert -​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20171010/bb1e3faa/attachment.html>

More information about the Squeak-dev mailing list