[NEWBIE] mouseUp help

Bill Spight bspight at pacbell.net
Sat Jan 4 07:53:11 UTC 2003


I am working on a Go board with the idea that each intersection would
deal with its own mouse events. (For game play I am thinking of having
it send the information to a game referee, which would make decisions,
since a play on one point may affect others. But for setup and markup I
thought each point should be able to operate independently. That could
also work for gomoku.) Anyway, I wrote this method for starters:

GoPoint>>handleMouseUp: evt 
		addMorph: (EllipseMorph newBounds: self bounds)

It works. Kawabunga! Click on an intersection and a yellow circle
appears there. :-)

The problem comes with the next mouse click. It can be anywhere in the
GoBoard's World and it affects the same GoPoint. Nothing is visible, but
inspection reveals that there are multiple "stones" on the point.
(Alt-click breaks the spell.)

How do I get each click to register on the intersection being clicked?

Many thanks,

Bill Spight

More information about the Squeak-dev mailing list