[Newbies] Scrolling Text setCharacters

Stephen Rowley stever1975 at gmail.com
Wed Jan 24 20:21:39 UTC 2007


Just learning smalltalk & squeak. One of the first things I wanted to try
was to load text into a scroll morph at the press of a button.

I  renamed the Scrolling Text morph scroll.
And I put the following code underneath button.
Everything seems fine but the last line

The error I get back is that scroll is an unknown variable.

So my question is am I referencing the scroll morph correctly in the button
script?

button
    | stream data |
    Transcript show: 'hello'.

"Read file into a string"
    stream _ FileStream fileNamed: 'test.txt'.
    data _ stream contentsOfEntireFile.
    stream close.
    Transcript show: data.
    scroll setCharacters: data.



Thanks in advance

Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20070124/95b6bedb/attachment.htm


More information about the Beginners mailing list