[Newbies] Creating a System Window containing a Morph and some buttons

Jeff G jgon.in.canada at gmail.com
Thu Jun 17 06:37:06 UTC 2010


Hi Everyone,

So I am working on porting over a small simulation I wrote for fun in java
to squeak, and I am actually stuck at a point before I can get any real work
done.  The basics of the user interface I would like to offer consist of a
SystemWindow containing a custom morph that will handle all of the drawing
and updating of the simulation, and some buttons for altering the parameters
of the simulation.  The morph would take up the largest portion of the
screen, say 3/4.

I have been wrestling with SystemWindow and Toolbuilder for the last little
while and I feel like I must be overlooking something easy to get started
with.  If I create a system window and add a placeholder morph to it, with a
frame of (0 at 0 corner: 0.5 at 1) the window becomes blue as it takes on the
color of the morph I added and the morph itself becomes white.  I would like
the morph to retain its color when I add it to the window, and not have the
window alter its own color either.

Second, if I were to add to morphs side by side, one with a frame of
(0 at 0corner: 0.5 at 1)
and the other with (0.5 at 0 corner: 1 at 1), then I will have a splitter in
between the morphs and any attempt to drag this splitter results in a
debugger popping up.

I have been attempting to learn Toolbuilder, but it seems very focused on
just that, tools, and I didn't see an appropriate spec for adding just a
custom subclass of morph.  I may have overlooked something easy here to do
so, and so my spec would consist of a pluggableWindow, with its children
being a pluggablePanelSpec with pluggableButtons as its children, and some
other spec representing the custom morph as the second child of the
windowSpec.

Any help or pointers towards creating a basic system window with a morph, or
a couple of morphs in it, respecting colors and layouts, and being resized
with the splitters would be greatly appreciated.

Thank you very much for your time,
Jeff G!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20100617/ede83a58/attachment.htm


More information about the Beginners mailing list