Getting a Programatic form for a Morph

Andrew P. Black apb at cse.ogi.edu
Wed Apr 18 08:37:52 UTC 2001


At 23:28 -0700 2001.04.17, Scott Wallace wrote:
>... construct the icons you like (construct them with EllipseMorphs 
>and TextMorphs, for example), then, in turn, grab each one from the 
>screen (Form fromUser inspect), evaluate "self storeString" in each 
>resulting Inspector to obtain a programmatical constructor

What a great idea!  Why did I never think of this as a way of getting 
some code that will draw a Morph!  Alright, Scott is actually saying 
to do this with a Form, not with a Morph, but the same idea should 
work, right?

I just tried this with a CurveMorph (the High Hat from the Voice 
Synth duet) and I got ... a low space alert.  Same happens with a 
simple EllipseMorph.  Hmm...  The idea is still good, but the 
implementation may need some work.  I think that it is trying to 
write out the whole of the Morphic World!  After all, each Morph  has 
a reference to its owner ...

I was going to attach the Stack trace, for those who are more Morphic 
savvy than I.  But it's 1.7 MB and kind of boring.  You can always 
generate it yourself ;-)
The top part reads like this:

Array(ArrayedCollection)>>storeElementsFrom:to:on:
Array(ArrayedCollection)>>storeOn:
Array>>storeOn:
WriteStream>>store:
PasteUpMorph(Object)>>storeOn:
WriteStream>>store:
ProjectNavigationMorph(Object)>>storeOn:
WriteStream>>store:
Array(ArrayedCollection)>>storeElementsFrom:to:on:
Array(ArrayedCollection)>>storeOn:
Array>>storeOn:
WriteStream>>store:
PasteUpMorph(Object)>>storeOn:
WriteStream>>store:
ProjectNavigationMorph(Object)>>storeOn:
WriteStream>>store:
Array(ArrayedCollection)>>storeElementsFrom:to:on:
Array(ArrayedCollection)>>storeOn:
Array>>storeOn:
WriteStream>>store:
PasteUpMorph(Object)>>storeOn:
WriteStream>>store:
ProjectNavigationMorph(Object)>>storeOn:
WriteStream>>store:
Array(ArrayedCollection)>>storeElementsFrom:to:on:
Array(ArrayedCollection)>>storeOn:
Array>>storeOn:
WriteStream>>store:
PasteUpMorph(Object)>>storeOn:
WriteStream>>store:
ProjectNavigationMorph(Object)>>storeOn:
WriteStream>>store:
Array(ArrayedCollection)>>storeElementsFrom:to:on:
Array(ArrayedCollection)>>storeOn:
Array>>storeOn:
WriteStream>>store:
PasteUpMorph(Object)>>storeOn:
WriteStream>>store:
ProjectNavigationMorph(Object)>>storeOn:
WriteStream>>store:
Array(ArrayedCollection)>>storeElementsFrom:to:on:
Array(ArrayedCollection)>>storeOn:
Array>>storeOn:
WriteStream>>store:
PasteUpMorph(Object)>>storeOn:
WriteStream>>store:
ProjectNavigationMorph(Object)>>storeOn:
WriteStream>>store:
Array(ArrayedCollection)>>storeElementsFrom:to:on:
Array(ArrayedCollection)>>storeOn:
Array>>storeOn:
WriteStream>>store:
PasteUpMorph(Object)>>storeOn:
WriteStream>>store:
ProjectNavigationMorph(Object)>>storeOn:
WriteStream>>store:
Array(ArrayedCollection)>>storeElementsFrom:to:on:
Array(ArrayedCollection)>>storeOn:
Array>>storeOn:
WriteStream>>store:
PasteUpMorph(Object)>>storeOn:
WriteStream>>store:
ProjectNavigationMorph(Object)>>storeOn:
WriteStream>>store:
Array(ArrayedCollection)>>storeElementsFrom:to:on:
Array(ArrayedCollection)>>storeOn:
Array>>storeOn:
WriteStream>>store:
PasteUpMorph(Object)>>storeOn:
WriteStream>>store:
ProjectNavigationMorph(Object)>>storeOn:
WriteStream>>store:
Array(ArrayedCollection)>>storeElementsFrom:to:on:
Array(ArrayedCollection)>>storeOn:
Array>>storeOn:
WriteStream>>store:
PasteUpMorph(Object)>>storeOn:
WriteStream>>store:
ProjectNavigationMorph(Object)>>storeOn:
WriteStream>>store:
Array(ArrayedCollection)>>storeElementsFrom:to:on:
Array(ArrayedCollection)>>storeOn:

	Andrew





More information about the Squeak-dev mailing list