Debugging through events

karl karl.ramberg at chello.se
Mon May 29 20:09:28 UTC 2006


Cowdery, Bob [UK] skrev:
> Is there a way to debug or even put Transcript writes into event
> handlers like drawOn and extent. My attempts seem to hang Squeak.
Here is a example I just did in FishEyeMorph that worked

extent: aPoint
    "Round to a number divisible by grid.  Note that the superclass has 
its own implementation."
    | g gridSize |
    gridSize _ self gridSizeFor: aPoint.
    "self halt."
    Transcript show: aPoint asString.
    g _ (aPoint - (2 * borderWidth)) // gridSize.
    srcExtent _ g * gridSize.
    gridNum _ g.
    ^super extent: self defaultExtent

Karl





More information about the Squeak-dev mailing list