I think the problem is that SystemWindow's think they are a main part of the UI, and so they try to initially position and resize themselves depending on what windows are already open and how big the display is. Arguably, SystemWindow's should *not* do this if their extent has been set explicitly.
It's a tricky area. One thing you can try is to give the window a model and override that model's #initialExtent method. This will work as long as you only have one window per model, and as long as your model can come up with a reasonable initial size. :|
-Lex
David Farber dfarber@numenor.com wrote:
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