Morphic - widget subclassing and inheritance
Ned Konz
ned at bike-nomad.com
Tue Sep 2 22:25:39 UTC 2003
On Wednesday 06 August 2003 06:22 am, Geza Lakner MD wrote:
> I am a newbie in Morphic and Smalltalk, and I just can't get around
> with this one. First, it is very painful to build and handle a
> usable, conventional dialog box in Morphic.
Have you seen the Squeak FAQ at
http://minnow.cc.gatech.edu/squeak/471 yet? Specifically, some of the
items under "Programming with Morphic" may help.
> Now, all these GUI mparts are programatically, practically
> inaccesible in the usual way. They have no global names (just some
> instantiation number in parenthesis), nor could they be pruned into
> existing classes via renaming or something like this. The only way
> I saw, is to subclass each widget. So I subclassed the button, and
> redefined doButtonAction. For testing purpose it was a tiny
> 'Transcript show:' message. It worked. I exhaled.
You shouldn't have to subclass. At least for widgets that exist
already (which doesn't include, for instance, a "combo box"), you can
make a dialog box by just plugging in the names of your model's
methods that you want the widgets to call back to when necessary.
> I think Squeak is a very nice platform but conventional programmers
> will have their hair raised up ;-) with the vastly underdocumented
> Morphic. Each tutorial picks a bells-and-whistles single morph to
> sing, turn or gallop around ;-) (I know, I know: Squeak is a
> schoolboy-oriented environment... )
eToys is, but that's not by any means all of Squeak.
> via scripting or through
> Workspace direct manipulation but neither tutorial mentions how to
> set up conventional interaction like building dialog boxes, data
> entry forms; how to "wire in" keyboard navigation between data
> entry widgets (e.g. tabbing cycle) etc.
I believe there are tutorials out there that cover this.
Anyone with a good pointer?
--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE
More information about the Squeak-dev
mailing list
|