Here's a question for all you morphic gurus out there:
Why does
aMorph openInWorld
behave differently from
World addMorph: aMorph. aMorph activate.
(or, more to the point, why does the former not behave like the latter.) To illustrate further, compare the behavior of these two snippets when execute at the end of the following:
| alignMorph win | alignMorph := AlignmentMorph new. alignMorph centering: #center; hResizing: #shrinkWrap; vResizing: #shrinkWrap; orientation: #vertical.
alignMorph addMorphBack: (BasicButton new label: 'a button'). alignMorph addMorphBack: (BasicButton new label: 'this is a button'). alignMorph addMorphBack: (BasicButton new label: '''nother button').
alignMorph fullBounds.
win := SystemWindow labelled: 'fooMail console'. win bounds: ((alignMorph position - ((0@win labelHeight) + win borderWidth)) corner: alignMorph bottomRight + win borderWidth + (2@2)). win addMorph: alignMorph frame: (0@0 extent: 1@1).
"World addMorph: win. win activate"
"verses"
"win openInWorld"
When I use win activate, i get my buttons-inside-an-alignment-morph all wrapped in a system window. When I use openInWorld, the system window reverts to some default size.
What's the scoop?
thanks, david
-- David Farber dfarber@numenor.com
squeak-dev@lists.squeakfoundation.org