Debugging through events

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Debugging through events

Bob.Cowdery

Is there a way to debug or even put Transcript writes into event handlers like drawOn and extent. My attempts seem to hang Squeak.

 

Thanks

Bob

*** Confidentiality Notice *** Proprietary/Confidential
Information belonging to CGI Group Inc. and its affiliates
may be contained in this message. If you are not a recipient
indicated or intended in this message (or responsible for
delivery of this message to such person), or you think for
any reason that this message may have been addressed to you
in error, you may not use or copy or deliver this message
to anyone else.  In such case, you should destroy this
message and are asked to notify the sender by reply email.



Reply | Threaded
Open this post in threaded view
|

Re: Debugging through events

Ned Konz
Cowdery, Bob [UK] wrote:
> Is there a way to debug or even put Transcript writes into event
> handlers like drawOn and extent. My attempts seem to hang Squeak.

Look at my CircularTranscript package (should be on SqueakMap but I
don't seem to have put it there); it is a transcript that you can write
to during event handlers, as it doesn't cause an immediate redraw.

http://bike-nomad.com/squeak/monticello/MiscTools/CircularTranscript-nk.11.mcz

You can't usefully use an interactive debugger from an event handler.

Thanks,
--
Ned Konz
[hidden email]
http://bike-nomad.com

Reply | Threaded
Open this post in threaded view
|

Re: Debugging through events

karl-8
In reply to this post by Bob.Cowdery
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