[Newbie] - Building a Morphic UI

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Newbie] - Building a Morphic UI

Dugald Wilson
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

Reply | Threaded
Open this post in threaded view
|

Re: [Newbie] - Building a Morphic UI

Frank Urbach
Hi Dugald!

Have look at Tweak.
http://tweak.impara.de

There you have some widgets you are searching for. The technology of islands keep the widgets together. The halos of the widgets can hidden programmaticly or set by color-tool. So destroying of the UI will prevent by these things.

Hope this helps.

Cheers,
Frank

-------- Original Message --------
Subject: [Newbie] - Building a Morphic UI (24-Feb-2006 12:47)
From:    Dugald Wilson <[hidden email]>
To:      [hidden email]

> 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
>



Reply | Threaded
Open this post in threaded view
|

Re: [Newbie] - Building a Morphic UI

Elod Kironsky
In reply to this post by Dugald Wilson
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

Reply | Threaded
Open this post in threaded view
|

Re: [Newbie] - Building a Morphic UI

Elod Kironsky

> 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 :-(.
>
Ok, it is the ProgrammingMorphs package by Lex Spoon, that can be
downloaded through SqueakMap.

Elod


Reply | Threaded
Open this post in threaded view
|

Re: [Newbie] - Building a Morphic UI

stéphane ducasse-2
In reply to this post by Dugald Wilson
Pay attention the browse is not a place to copy.
You can have a look at what I learned in the BreakOut and Quinto game  
in Morphic
available on Squeakmap.

Stef

Reply | Threaded
Open this post in threaded view
|

Re: [Newbie] - Building a Morphic UI

Dugald Wilson
In reply to this post by Dugald Wilson

Thanks to all for your quick replies.  I've forwarded the digest home
for me to browse at the weekend.

To quote Arnie Schwarzenegger:  "I'll be back!"

--
Dugald