At 7:40 PM 1/29/98, Ward Cunningham wrote:
- What is the easiest way to draw a graphical object (e.g., a line)?
Phillippe -- Andreas offers some nicely general solutions to your question. I'd like to add that Smalltalk has always supported turtle graphics which is probably the EASIEST way to draw a line:
Pen new turn: 30; go: 100
I can get one level easier, if you're willing to interact with the code:
Line example
Click at the starting point, click at the ending point. POOF! A line!
This is the example that I use in class to shock students by drawing lines across windows and scrollbars. (This quarter, there was an audible "Cool!" :-)
BTW, I just wrote a position paper for a CHI workshop on Learner Centered Design where I talked about Squeak and being able to draw on your windows. Comments welcome! http://guzdial.cc.gatech.edu/Commentary/userAsLearner.html
Mark
-------------------------- Mark Guzdial : Georgia Tech : College of Computing : Atlanta, GA 30332-0280 (404) 894-5618 : Fax (404) 894-0673 : guzdial@cc.gatech.edu http://www.cc.gatech.edu/gvu/people/Faculty/Mark.Guzdial.html
squeak-dev@lists.squeakfoundation.org