class: MenuPanel
authorStefan Vogel <sv@exept.de>
Mon, 08 Jun 2015 17:52:37 +0200
changeset 4782 e43a7165041e
parent 4780 ac7e1d23c65b
child 4783 5818ff375332
child 4784 7c4d1f1a6b30
class: MenuPanel use #argumentCount (ANSI) instead of #numArgs
MenuPanel.st
--- a/MenuPanel.st	Mon Jun 08 02:24:35 2015 +0200
+++ b/MenuPanel.st	Mon Jun 08 17:52:37 2015 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1997 by eXept Software AG
 	      All Rights Reserved
@@ -7238,32 +7240,32 @@
 
     appl := menuPanel receiver.
     (appl isValueModel) ifTrue:[
-	^ appl value:aKey
+        ^ appl value:aKey
     ].
     appl isNil ifTrue:[
-	appl := menuPanel application.
-	appl isNil ifTrue:[ ^ nil].
+        appl := menuPanel application.
+        appl isNil ifTrue:[ ^ nil].
     ].
 
     MessageNotUnderstood handle:[:ex|
-	ex selector ~~ aKey ifTrue:[
-	    ex reject
-	].
-	self ifNotInUIBuilderInfoPrintCR:
-	    ('MenuPanel::Item [info]: application (%1) does not provide aspect: %2 (in %3)'
-	     bindWith:appl classNameWithArticle
-	     with:aKey
-	     with:(label isString ifTrue:[label] ifFalse:[self nameKey ? self itemValue ? '???'])).
+        ex selector ~~ aKey ifTrue:[
+            ex reject
+        ].
+        self ifNotInUIBuilderInfoPrintCR:
+            ('MenuPanel::Item [info]: application (%1) does not provide aspect: %2 (in %3)'
+             bindWith:appl classNameWithArticle
+             with:aKey
+             with:(label isString ifTrue:[label] ifFalse:[self nameKey ? self itemValue ? '???'])).
     ] do:[
-	aKey numArgs == 1 ifTrue:[
-	    value := appl perform:aKey with:(menuItem argument ? self).
-	] ifFalse:[
-	    (appl respondsTo:#aspectFor:) ifTrue:[
-		value := appl aspectFor:aKey
-	    ] ifFalse:[
-		value := appl perform:aKey
-	    ]
-	]
+        aKey argumentCount == 1 ifTrue:[
+            value := appl perform:aKey with:(menuItem argument ? self).
+        ] ifFalse:[
+            (appl respondsTo:#aspectFor:) ifTrue:[
+                value := appl aspectFor:aKey
+            ] ifFalse:[
+                value := appl perform:aKey
+            ]
+        ]
     ].
     ^ value
 
@@ -8932,11 +8934,11 @@
 !MenuPanel class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.607 2015-05-06 12:56:34 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.608 2015-06-08 15:52:37 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.607 2015-05-06 12:56:34 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/MenuPanel.st,v 1.608 2015-06-08 15:52:37 stefan Exp $'
 ! !