openInWorld vs activate

David Farber dfarber at
Fri Sep 29 20:02:53 UTC 2000

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.
	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 at win labelHeight) + win borderWidth))
			corner: alignMorph bottomRight + win borderWidth +
				(2 at 2)).
win addMorph: alignMorph frame: (0 at 0 extent: 1 at 1).

"World addMorph: win.
win activate"


"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?


David Farber
dfarber at

More information about the Squeak-dev mailing list