[Newbies] Drawing a line on a morph

Christine Wolfe cwdw01 at earthlink.net
Fri Oct 30 18:11:23 UTC 2009

I tried it but the debugger says it doesn't understand drawFace1: I've
double and triple checked and drawFace1: is there. 

-----Original Message-----
From: K. K. Subramaniam [mailto:subbukk at gmail.com] 
Sent: Friday, October 30, 2009 1:18 PM
To: beginners at lists.squeakfoundation.org
Cc: Christine Wolfe
Subject: Re: [Newbies] Drawing a line on a morph

On Friday 30 October 2009 09:22:26 pm Christine Wolfe wrote:
> What I am trying to do is have a group (array, set, collection?) of
> on a rectangle - sort of like a child's building block with an image on
>  each of the faces. I want 1 face to be blank, one to have a line, one to
>  have a diamond, and one to have a rectangle.
How about:
drawOn: aCanvas
	super drawOn: aCanvas.
	self perform: ('drawFace', dieValue asString) asSymbol with: aCanvas

drawFace1: aCanvas
	"leave blank"

drawFace2: aCanvas
	self drawLineOn: aCanvas from: self topLeft to: self bottomRight.

HTH .. Subbu

More information about the Beginners mailing list