--- a/MenuPanel.st Wed Mar 23 20:05:30 2011 +0100
+++ b/MenuPanel.st Thu Mar 24 10:17:46 2011 +0100
@@ -7760,44 +7760,47 @@
numArgs := sel numArgs.
numArgs == 0 ifTrue:[
- gotMenu := false.
- MessageNotUnderstood handle:[:ex |
- |selector|
-
- ((selector := ex selector) == sel
- or:[selector == #aspectFor:]) ifFalse:[
- ex reject
- ].
- ] do:[
- subm := aRecv aspectFor:sel.
- gotMenu := true.
- ].
- "/ used to be subm notNil; however, this is a bad test,
- "/ as it does not allow for the app to return nil for no-menu.
- gotMenu ifTrue:[^ subm].
+ gotMenu := false.
+ MessageNotUnderstood handle:[:ex |
+ |selector|
+
+ ((selector := ex selector) == sel
+ or:[selector == #aspectFor:]) ifFalse:[
+ ex reject
+ ].
+ ] do:[
+ subm := aRecv aspectFor:sel.
+ gotMenu := true.
+ ].
+ "/ used to be subm notNil; however, this is a bad test,
+ "/ as it does not allow for the app to return nil for no-menu.
+ gotMenu ifTrue:[^ subm].
].
(Array with:(aRecv) with:(aRecv class))
do:[:aPossibleReceiver |
- MessageNotUnderstood handle:[:ex|
- ex message selector == sel ifFalse:[ ex reject ]
- ] do:[
- numArgs == 0 ifTrue:[
- subm := aPossibleReceiver perform:sel
- ] ifFalse:[
- numArgs == 1 ifTrue:[
- subm := aPossibleReceiver perform:sel with:(menuItem argument ? menuPanel)
- ] ifFalse:[
- subm := aPossibleReceiver perform:sel with:(menuItem argument) with:menuPanel
- ]
- ]
- ].
- subm notNil ifTrue:[^ subm].
+ MessageNotUnderstood handle:[:ex|
+ ex message selector == sel ifFalse:[ ex reject ]
+ ] do:[
+ numArgs == 0 ifTrue:[
+ subm := aPossibleReceiver perform:sel
+ ] ifFalse:[
+ numArgs == 1 ifTrue:[
+ subm := aPossibleReceiver perform:sel with:(menuItem argument ? menuPanel)
+ ] ifFalse:[
+ subm := aPossibleReceiver perform:sel with:(menuItem argument) with:menuPanel
+ ]
+ ]
+ ].
+ subm notNil ifTrue:[^ subm].
+ Smalltalk isSmalltalkDevelopmentSystem ifTrue:[
+ Transcript showCR:('no submenu for "%1" from %2' bindWith:sel with:aPossibleReceiver).
+ ]
].
^ subm
- "Modified: / 22-09-2010 / 13:56:50 / cg"
+ "Modified: / 24-03-2011 / 10:17:16 / cg"
!
indicationValue
@@ -8476,11 +8479,11 @@
!MenuPanel class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.514 2011-01-20 07:17:40 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.515 2011-03-24 09:17:46 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.514 2011-01-20 07:17:40 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.515 2011-03-24 09:17:46 cg Exp $'
! !
MenuPanel initialize!