[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squeak-dev
Subject:    openInWorld vs activate
From:       David Farber <dfarber () numenor ! com>
Date:       2000-09-29 20:02:53
[Download RAW message or body]


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



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic