On 07/27/2010 12:21 PM, Denis Kudriashov wrote:
Hello,
I found method doesNotUnderstand have very strange implementation
[...]
When Error has no handlers #defaultAction is executed. For MessageNotUnderstood #defaultAction is UnhandledError signal. And for UnhandledError #defaultAction is opening debugger. If you change it to do nothing (^self) you get infinite loop on any MessageNotUnderstood signal. It is because "ifTrue" branch executed in doesNotUnderstood method and message resend to receiver.
Why method implemented such way? Why it is differ from ProtoObject implementation. I think It's bug implementation.
It's this way so that in development when you hit a MNU the debugger opens, you can define the missing method, hit proceed in the debugger, and it retries the send. It's not the best implementation for allowing the debugger to be turned off in production like you're doing. Regards, -Martin