[Newbie] - Building a Morphic UI
Dugald Wilson
dwilson at cad-schroer.co.uk
Fri Feb 24 11:47:04 UTC 2006
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.
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.
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.
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...
4. In the SystemWindow how do you change the colour of the title bar,
short of doing a treewalk through all the submorphs to set their colour
individually?
An answer to these issues would, I suppose, be to subclass all the
components I need for my UI to provide reasonable default behaviour.
This would be building my own UI system from the very bottom upwards - a
task I would rather not do. There must be a better way - surely.
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.
Hmmph!
I'm sure that the second time (if there is one) it should be quicker.
--
Dugald Wilson
More information about the Squeak-dev
mailing list
|