[Newbies] Catching message send
Scott Wallace
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.
Cheers,
-- Scott
On Oct 31, 2006, at 2:32 AM, Mathieu wrote:
> Hi,
>
> Is there a way to catch message send to a specifoque object?
>
> Thanks
> Math
>
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
More information about the Beginners
mailing list