--- a/DebugView.st Sat Jan 23 13:41:21 2016 +0100
+++ b/DebugView.st Sat Jan 23 13:48:57 2016 +0100
@@ -8218,56 +8218,59 @@
canDefineForCallee:callee
"again, pure heuristics here"
- |mthd app heuristic selector|
+ |mthd app heuristic selector sender|
+
+ callee isNil ifTrue:[^ false].
classToDefineIn := selectorToDefine := nil. "/ sorry - left as info to define action
- callee notNil ifTrue:[
- "/ clicked on an unimplemented method ?
- callee sender notNil ifTrue:[
- mthd := callee sender method.
- mthd isNil ifTrue:[
- callee sender isBlockContext ifFalse:[
- "/ an unimplemented method
- selector := callee sender selector.
- (callee sender receiver class canUnderstand:selector) ifFalse:[
- classToDefineIn := callee sender receiver class.
- selectorToDefine := selector.
- ^ true
- ]
- ]
- ].
- ].
-
- mthd := callee method.
- mthd notNil ifTrue:[
- (mthd selector == #subclassResponsibility) ifTrue:[
- classToDefineIn := callee sender receiver class.
- selectorToDefine := callee sender selector.
- ^ true.
- ].
-
- "/ that's a big hack, but I am tired of navigating to find the missing menu message...
- "/ you will thank me!!
- mthd selector == #error:mayProceed: ifTrue:[
- (callee receiver isKindOf:MenuPanel) ifTrue:[
- callee sender home notNil ifTrue:[
- (callee sender home selector startsWith:'accept:') ifTrue:[
- (inspectedProcess notNil and:[inspectedProcess isGUIProcess]) ifTrue:[
- (app := self processesApplication) notNil ifTrue:[
- heuristic := callee sender home argsAndVars select:[:o | o isSymbol].
- heuristic size == 1 ifTrue:[
- classToDefineIn := app class.
- selectorToDefine := heuristic first.
- ^ true
- ].
- ].
- ].
- ].
- ].
- ].
- ]
- ]
+ "/ clicked on an unimplemented method ?
+ sender := callee sender.
+ sender isNil ifTrue:[^ false].
+
+ mthd := sender method.
+ mthd isNil ifTrue:[
+ sender isBlockContext ifFalse:[
+ "/ an unimplemented method
+ selector := sender selector.
+ (sender receiver class canUnderstand:selector) ifFalse:[
+ classToDefineIn := sender receiver class.
+ selectorToDefine := selector.
+ ^ true
+ ]
+ ]
+ ].
+
+ mthd := callee method.
+ mthd notNil ifTrue:[
+ (mthd selector == #subclassResponsibility) ifTrue:[
+ classToDefineIn := sender receiver class.
+ selectorToDefine := sender selector.
+ ^ true.
+ ].
+
+ "/ that's a big hack, but I am tired of navigating to find the missing menu message...
+ "/ you will thank me!!
+ mthd selector == #error:mayProceed: ifTrue:[
+ (callee receiver isKindOf:MenuPanel) ifTrue:[
+ |senderHome|
+
+ (senderHome := sender home) notNil ifTrue:[
+ (senderHome selector startsWith:'accept:') ifTrue:[
+ (inspectedProcess notNil and:[inspectedProcess isGUIProcess]) ifTrue:[
+ (app := self processesApplication) notNil ifTrue:[
+ heuristic := senderHome argsAndVars select:[:o | o isSymbol].
+ heuristic size == 1 ifTrue:[
+ classToDefineIn := app class.
+ selectorToDefine := heuristic first.
+ ^ true
+ ].
+ ].
+ ].
+ ].
+ ].
+ ].
+ ]
].
^ false
!