On 18.02.2009, at 22:46, Michael Roberts wrote:
Did Marcus not write some code a while ago that checked the context before raising the error?
I extended #haltIf: to check the selectors of methods on the stack. (This way one can put a halt into OrderedCollection>>add:, for example). I think that behind this is some very important basic concept... Something like the idea that the world should not look the same from everywhere. E.g, one wants to be able to debug the UI and restrict the visibility of the breakpoints (and even then the code one changes) to the debug session. Nice area of research, we did some stuff that is related e.g. http://www.iam.unibe.ch/~scg/cgi-bin/scgbib.cgi/abstract=yes?Denk07c http://www.iam.unibe.ch/~scg/cgi-bin/scgbib.cgi/abstract=yes?Denk08b Much more is needed, both in terms of pure conceptual research and then especially in making in "real".
Another thing that can be very helpful is a class called Once. It can be #reset and is used something like (if there is interest I can look for it)
Once do:[ self halt. ].
There is #haltOnce in Pharo (and in Squeak, at least in 3.9). Marcus -- Marcus Denker -- denker@acm.org http://www.marcusdenker.de