Load as Morph!

Hannes Hirzel hirzel at spw.unizh.ch
Tue Feb 5 09:32:17 UTC 2002


On Tue, 5 Feb 2002, Gary McGovern wrote:

> Here's the answer for any newbie student. I hope the knowbies don't mind my questions 
> because I do believe multimedia questions were meant to be part of the list (according to 
> an email from Dan Ingalls last autumn.

Don't hesitate to ask further questions. That helps the community - either
to document things more thoroughly, give more examples or to fix things.

Actually there are about 1000 subscribers do the list. Most of them never
dare to ask questions. I cannot imagine that they don't have any. Having
subscribed means beeing interested somehow.

Actually your question and Bob's answer prompted me to open a new Swiki
page
http://minnow.cc.gatech.edu/squeak/2236
How to save and load a Morph.

Anyhow I realized later that in a 3.3a-4664 image the method
Morph>>fromFileName: is gone. This in fact emphasis the
fact that your question is very valuable. An it means that the newly
crated swiki page might need some elaboration (anybody may do it).

When you load a morph through the FileList the method
openMorphFromFile
is used.

An that method calls
ReadWriteStream fileInObjectAndCode.

That method uses a SmartRefStream.

I think copying the code from FileList openMorphFromFile and adapting to
your needs will do the job.

Regards
Hannes Hirzel




More information about the Squeak-dev mailing list