Load as Morph!

Bob Arning arning at charm.net
Tue Feb 5 02:27:42 UTC 2002


On Tue, 05 Feb 2002 01:24:15 -0000 Gary McGovern <gary.play at btopenworld.com> wrote:
>I'm looking to find how to write a method to load an existing morph. I was expecting the 
>menu selector to be a universal command, but not so. 
>
>Can someon give some example code to load a morph. (such as an ellipse with added 
>textxmorph 'hello') ?

Gary,

Try

	Morph fromFileName: 'yourfile.morph'

which is what would be called if you pointed a FileList at a file with a suffix of .morph and chose 'load as morph' from the menu. This all assumes that what you are trying to load was written using one of the 'save morph in file' menu items or equivalent.

Cheers,
Bob



More information about the Squeak-dev mailing list