System Windows making me insane!
Kevin Fisher
kgf at golden.net
Wed Jan 17 02:47:30 UTC 2001
I was just wondering if someone could throw me some sanity for a moment. :)
I'm banging my head against SystemWindow right now...it never seems to do what
I want it to do! Take this example...I've got a RectangleMorph of a given
size. I want to wrap that in a SystemWindow. Simple, right? Well, it never
works for me.
Here's a code snip:
| playfield syswin newExtent |
playfield _ RectangleMorph new.
playfield extent: 80 at 60.
syswin _ (SystemWindow labelled: 'foo') model: nil.
newExtent _ (playfield extent + (syswin borderWidth@(syswin labelHeight) +
syswin borderWidth)).
syswin extent: newExtent.
syswin setProperty: #minimumExtent toValue: newExtent.
syswin updatePaneColors.
syswin addMorph: playfield frame: (0 at 0 extent: 1 at 1).
syswin openInWorld
When I execute this code snip in a Workspace, I get a huge SystemWindow
encapsulating an equally huge RectangleMorph. I wanted the RectangleMorph to
be 80 at 60 in size...however the SystemWindow stretches it out quite large.
I know I'm missing something obvious here...can anyone toss me a line? :)
Ever since the new alignment stuff came in, none of my SystemWindows
encapsulating AlignmentMorphs are drawn with the proper size anymore. (Yes,
I've only now taken the dive to the new code...)
More information about the Squeak-dev
mailing list
|