[Newbies] Catching message send
madevu at pacbell.net
Tue Oct 31 10:47:35 UTC 2006
One common, if unartful, technique for doing this kind of thing while
debugging is temporarily to stash a reference to the specific object
in a global, and then, in the method in question, check to see if the
receiver is that object.
Thus, in an Inspector on the object in question, evaluate, say,
"Smalltalk at: #AA put: self".
Then in the method in question, put something like "self == AA
ifTrue: [self halt]"
To clean up afterwards, you can evaluate "Smalltalk removeKey: #AA
ifAbsent: " and, of course remove the debugging code from the method.
On Oct 31, 2006, at 2:32 AM, Mathieu wrote:
> Is there a way to catch message send to a specifoque object?
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
More information about the Beginners