Squeak BonMots

See http://c2.com:8080/SqueakBonMots for more on these.

Screendump to GIF

GIFReadWriter putForm: Display onFileNamed: 'screenshot.GIF'

You'll need http://www.cc.gatech.edu/fac/mark.guzdial/squeak/giffix2.cs for the above to work. This makes the GIFReadWriter work correctly.

World's Smallest Drawing Program

| myPen |
myPen := Pen new defaultNib: 2.
myPen up; goto: Sensor mousePoint; down.
[Sensor waitButton ; yellowButtonPressed] whileFalse: 
	[Sensor redButtonPressed 
		ifTrue: [myPen goto: Sensor mousePoint]].

Playing a Scale with Squeak

(PluckedSound namedNoteSequenceFrom: #( (c4 1 500) (d4 1 500) (e4 1 500) (f4 1 500) 
(g4 1 500) (a4 1 500) (b4 1 500) (c5 1 500))) play

Grabbing Pages and Gifs from the Web

HTTPSocket httpShowPage: 'www.cc.gatech.edu/fac/mark.guzdial/squeak/'

In Squeak 1.23, this will fetch the given page and display it in its own window.

HTTPSocket httpShowGif: 'www.cc.gatech.edu/fac/mark.guzdial/squeak/images/sqlogo.gif'

This will fetch the image and display it in its own window.


"More About Squeak..."
Home Page for How To Squeak

Last modified at 1/30/98; 10:05:06 AM
Other Links of Interest
College of Computing | EduTech Institute | GVU Center
Mark Guzdial | CS2390, Modeling and Design | STABLE