[BUG][FIX] Comment on DisplayText(class)>>example

Mark Guzdial guzdial at cc.gatech.edu
Fri Apr 28 18:33:36 UTC 2000


Could we get this added into the 2.8 release stream?  I show this 
method in a browser in part of my book, and the comment is wrong. 
The demo ends when you click any button on the mouse, not any key on 
the keyboard.

Thanks!
  Mark

'From Squeak2.8alpha of 19 January 2000 [latest update: #2042] on 28 
April 2000 at 2:31:53 pm'!

!DisplayText class methodsFor: 'examples' stamp: 'mjg 4/28/2000 14:31'!
example
	"Continually prints two lines of text wherever you point with 
the cursor
	and press any mouse button.  Terminate by pressing any button on the
	mouse."
	| tx |
	tx _ 'this is a line of characters and
this is the second line.' asDisplayText.
	tx foregroundColor: Color black backgroundColor: Color transparent.
	tx _ tx alignedTo: #center.
	[Sensor anyButtonPressed]
		whileFalse:
			[tx displayOn: Display at: Sensor cursorPoint]

	"DisplayText example."! !
--------------------------
Mark Guzdial : Georgia Tech : College of Computing : Atlanta, GA 30332-0280
(404) 894-5618 : Fax (404) 894-0673 : guzdial at cc.gatech.edu
http://www.cc.gatech.edu/gvu/people/Faculty/Mark.Guzdial.html





More information about the Squeak-dev mailing list