New to morphic. Question about SystemWindow usage.

fuyjfu dtdty finalfightvii at yahoo.com
Sun Aug 14 11:13:46 UTC 2005


Hello everyone.

I'm trying to write a little note-taking application
to make myself familiar with Morphic.

I noticed many tools that come with Squeak utilize
SystemWindow, such as the class browser and the
language editor, so I assumed this was the preferred
type of morph to use as top-level container for
submorphs.

After searching through some of the classes and
looking at example code, I tried writing some Morphic
code:

w _ SystemWindow new.
w position: 10 at 10.

row _ AlignmentMorph newRow borderWidth: 0.
row addMorphBack: (StringMorph contents: 'Name: ');
addMorphBack: (TextMorph new).

row2 _ AlignmentMorph newRow borderWidth: 0.
row2 addMorphBack: (StringMorph contents: 'Address:
'); addMorphBack: (TextMorph new).

w addMorph: row frame: (0 at 0 extent: 1 at 0.1).
w addMorph: row2 frame: (0 at 0.1 extent: 1 at 0.1).
w openAsIs.

Unfortunately, my call to #borderWidth: for the first
row seemed to be ignored. Eventually I figured out
that if you alter the AlignmentMorph after adding it
to the window, the settings won't get overridden. So I
added this call before the call to #openAsIs:

row borderWidth: 0. row2 borderWidth: 0.

Then it seemed to work. Then I noticed all of the
tools that use SystemWindow also devide the windows up
into panes. It seems like maybe SystemWindow isn't
designed for the way I'm trying to use it.

I have two questions:

1) Should I abandon SystemWindow altogether--unless I
need panes--and use something like BorderedMorph as a
container instead?

2) What's the differtence between #openInWorld and
#openAsIs?

Thanks.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Squeak-dev mailing list