[newbie] Really Basic Morphic UI Question
jim_barton at hotmail.com
Tue Feb 26 15:11:10 UTC 2002
I am a Smalltalker from a few years back, and I'm looking for an environment
to teach my 9-year-old daughter the basics of programming. Squeak was an
obvious choice to me. Since I had never used it before, I downloaded it and
played around for awhile, particularly focusing on morphic programming since
I'd never seen it before.
After I'd played around for awhile and gotten the feel of the place, I
decided to move from chasing stars around my world to more prosaic things.
First, I decided to do the old Counter example, so I coded up my Counter and
tested it in a workspace, then tried to add the UI. Doing everything with
Smalltalk, I finally got it to work, although it was a little more painful
than I thought it would be.
Then I tried to do the same thing using only the morphic interfaces. I
couldn't figure it out. I created a button and a text field, stuck a '0' in
the text field, and tried to create a scriptlet that would increment the
field value everytime I pressed the button. I could make that text field
croak, chirp, run around in circles and turn purple, but I couldn't figure
out for the life of me how to change that '0' into a '1'. The Principle of
Least Astonishment informed me that surely there was some property in the
TextField's interface that I could use to manipulate the contents of the
field, but I couldn't find it. Frustrated, I dropped down to Smalltalk and
inspected and explored my way down to the value, but I couldn't figure out a
way to change it from a scriptlet.
I know this must be trivially simple to solve, right? Can someone help
before I'm forced to teach my daughter Java ;-) ???
Send and receive Hotmail on your mobile device: http://mobile.msn.com
More information about the Squeak-dev