Mantis - Squeak
Viewing Issue Advanced Details
7814 Any major always 03-30-14 11:36 11-21-15 22:03
Herbert Koenig  
0007814: Can't save morphic projects from 4.5 to local disk only
In a fresh 4.5 all in one:
Projects --> new morphic project
In that Project:
Projects --> save project
Fill in the dialog, save on local disk only --> MNU "ScrapBook>>emptyScraps book"

Fails with empty project and with some Morphs in the project
 MessageNotUnderstood# ScrapBook##emptyScrapsBook.png [^] (28,292 bytes) 03-30-14 11:36
 NotImplemented# ClassBinding or a superclass should implement objectForDataStream#.gif [^] (20,661 bytes) 03-30-14 15:24

Herbert Koenig   
03-30-14 11:40   
OS: Win 7 64 Bit Home Premium
03-30-14 14:07   
We have at least two problems here. The first problem is MNU ScrapBook>>enptyScrapsBook. This is a spelling error in some recently refactored methods, and is now fixed in trunk.

There is an additional problem, not yet resolved, related to Environments. Saving a project now leads to:

ClassBinding>>objectForDataStream: refStream
    "It's not yet clear how serialization should work in the presence of environments"
    self shouldBeImplemented.
07-26-15 02:56   
Colin suggested a short-term fix here: [^]

For Binding>>objectForDataStream: the easy fix for the default case is to use the same implementation as Association>>objectForDataStream:. This will make save and reloading of object work in the case where there's only one environment in the image.

The case of multiple environments boils down to this: saving objects to
disk would have to be done from the perspective of a given environment, and
loading would have to be done from that of an equivalent environment.
Association's implementation special-cases instances that represent global
variables so that they get looked up in "Smalltalk globals" when the
objects are reloaded from disk. That should be replaced with "Environment
current" so that the lookup happens in the environment we're loading
against, rather than the environment where Binding is compiled.

Looking further up the layers of abstraction, each Project should probably
have its own environment, which would be used for compiling custom code for
that project, and serializing the project to disk.

11-21-15 22:03 [^]

Colin's suggested workaround for Bindings [^]