if item-values were defined,
authorClaus Gittinger <cg@exept.de>
Sat, 13 Nov 1999 13:27:47 +0100
changeset 2041 8107fe7c8cff
parent 2040 7e2052cb0c8c
child 2042 7080474e7966
if item-values were defined, return nil (instead of 0) if nothing was selected.
PopUpMenu.st
--- a/PopUpMenu.st	Tue Oct 26 14:38:38 1999 +0200
+++ b/PopUpMenu.st	Sat Nov 13 13:27:47 1999 +0100
@@ -829,6 +829,9 @@
     |return rec sel0 sel1 arg myAction|
 
     return := 0.
+    actionValues notNil ifTrue:[
+        return := nil
+    ].
 "/    menuView args notNil ifTrue:[
 "/        return := nil
 "/    ].
@@ -848,13 +851,16 @@
             |actionIndex value sel retVal selIdx
              args selectors checkFlags check|
 
+            retVal := 0.
+            actionValues notNil ifTrue:[
+                retVal := nil
+            ].
+
             selected isNil ifTrue:[
                 "/ the menu has already sent a message or performed an item-action; do nothing here
-                ^ 0
+                ^ retVal
             ].
 
-            retVal := 0.
-
             selIdx := menuView selection.
 
             args := menuView args.
@@ -1517,5 +1523,5 @@
 !PopUpMenu class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/PopUpMenu.st,v 1.80 1999-10-22 15:39:01 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/PopUpMenu.st,v 1.81 1999-11-13 12:27:47 cg Exp $'
 ! !