position: aPoint super position: aPoint. This does not set a value to your position variable in class Ball, but actually sets the upper-left corner of the bounds. You should have said position := aPoint. -------------------------------- The following now works in mySqueak image: EllipseMorph subclass: #Ball instanceVariableNames: 'position' classVariableNames: '' poolDictionaries: '' "this part is needed in Squeak" category: 'ZZZtesting' drawOn: aCanvas self borderWidth:10; borderColor: Color green. super drawOn: aCanvas. position ^ position. position: aPoint position := aPoint.I then execute the following in a workspace
@Trygve I've checked and it doesn't work. I can't even bring the halo on to delete the morph. The debugger keeps popping. Thanks anyway to all Nacho ----- Nacho Smalltalker apprentice. Buenos Aires, Argentina. -- View this message in context: http://forum.world.st/Question-on-Morphic-drawOn-method-tp4803695p4803895.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
The essence of object orientation is
that objects collaborate to achieve a
goal.
Trygve Reenskaug [hidden email]
Morgedalsvn.
5A http://folk.uio.no/trygver/
N-0378
Oslo http://fullOO.info
Norway Tel:
(+47) 22 49 57 27
Free forum by Nabble | Edit this page |