[Newbie] - Building a Morphic UI

Elod Kironsky kironsky at grisoft.cz
Fri Feb 24 12:12:11 UTC 2006


Hi Dugald!

> Hi to all.
>
> I have played around with Squeak but not really seriously until now. 
> Even my 7 year old has been playing with it for the last 2 years!  My 
> 12 year old has toyed with the Morphic programming bits.

That is good to hear :-)

>
> However, I have a VisualWorks ST app that I want to translate to 
> Squeak, more as an exercise in learning to develop UIs in Squeak.  The 
> real code, of which there is a lot, is fairly easy to translate, and 
> this has been done mostly.  The UI remains the problem: I need radio 
> buttons, scaled graphics, mouse interaction etc..
>
> Several things...
>
> 1. Building a real UI seems so, so hard, especially if you want it to 
> look "professional" rather than "string and sealing wax".  Is there no 
> UI builder?  Does everyone roll their own UI?  This hinders all 
> attempts at rapid prototyping.
>
Building UI in Squeak is the easiest thing to do. All you have to do is 
play around a bit and explore. You will find almost every widget you 
need and the great thing about Morphic is that you can change the look 
of every Morph fairly simply without modifying the behavior. However, if 
you are looking for an UI builder, you should consider wxSqueak I think, 
altough I haven't tried it myself.

> 2. While old Squeakers might be happy about this, I do not think it 
> useful or advisable for the app user to be able to dismantle the UI 
> using halos, selecting UI components and spreading them around the 
> screen.  This, I find, is the most unsatisfactory part of the basic 
> Squeak system UI: it's too easy to destroy it.
>
Halos can be disabled I think. You can for example lock the image and 
the halos are disabled then. I agree with you, that if building serious 
(and especially for non expereinced users) application, then the halos 
should be disabled, because it is annoying when you unwantedly close a 
window or just make to vanish a contorol/widget.

> 3. Although the AlignmentMorph is "on the way out", it seems quite a 
> good idea to help in grouping items in find of frames.  LayoutPolicy 
> doesn't seem to do the same work in resizing, shrinkwrapping, spacing...
>
I use LayouPolicy myself, it is quite sophisticated I think but needed 
some workarounds in special cases.

> I have not found much documentation to help.  I'm using Mark Guzdial's 
> book as a guide but it's old - Squeak 2.7.  Otherwise it's just 
> scavenging in the Browser.
>
Best documentation is the Smalltalk source code ;-) I know that it 
sounds a bit strange but it is true. When I started with Morphic (an UI 
for modelling program) I knew nothing about it, but then started to play 
around and experiment with morphs. There is a good tutorial for 
begginners in Morphic that you can download form SqueakMap. 
Unfortunatelly I can't remeber the name :-(.

Elod



More information about the Squeak-dev mailing list