[Newbies] Keyboard input - programming course
karlramberg at gmail.com
Mon Jul 4 21:03:59 UTC 2011
On Mon, Jul 4, 2011 at 10:47 PM, Stephen Woolerton
<sdw2 at shineonline.co.nz>wrote:
> - how would one display a text label and a text field and obtain input
>>> from the text field (am thinking of Morphic)
>> name := UIManager default request: 'Enter your name'.
>> Transcript show: name; cr.
>> Thank you - this is exactly what I was looking for - the simplest way of
> getting input.
> However, IMHO this is *not* the best way to introduce Squeak programming
>> to beginners. It mimics procedural programming in a console.
>> I fully agree with you. The reason is that there are external criteria
> which we have to meet. The criteria requires keyboard input, and personally
> have only used Squeak for Seaside projects so didn't know how to do this
> simple thing :-)
> Instead, just open a Workspace and begin evaluating expressions. There
>> doesn't have to be a "program". In fact, there is no "main". Just send
>> messages to objects.
>> 3 + 4
>> 1234 / 56
>> 100 factorial
>> 'foo bar' asUppercase
>> Then, make a Morph and send it messages. Evaluate each line individually
>> to see its effect.
>> joe := Morph new.
>> joe openInWorld.
>> joe position: 100 at 100.
>> joe color: Color red.
> Thanks again.
> Beginners mailing list
> Beginners at lists.**squeakfoundation.org<Beginners at lists.squeakfoundation.org>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners