[Newbies] Keyboard input - programming course
karl ramberg
karlramberg at gmail.com
Mon Jul 4 21:03:59 UTC 2011
Allso this
https://gforge.inria.fr/frs/download.php/10764/BotsInc-OriginalEnglish.pdf
Karl
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.
>
> Stephen
>
> ______________________________**_________________
> Beginners mailing list
> Beginners at lists.**squeakfoundation.org<Beginners at lists.squeakfoundation.org>
> http://lists.squeakfoundation.**org/mailman/listinfo/beginners<http://lists.squeakfoundation.org/mailman/listinfo/beginners>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20110704/a68b570c/attachment.htm
More information about the Beginners
mailing list