Menu.st
changeset 1367 37bf7a7b5bd1
parent 1354 0c7e6c83b440
child 1397 47ac1d3e1df1
--- a/Menu.st	Tue Mar 28 19:40:43 2000 +0200
+++ b/Menu.st	Sat Apr 01 16:29:49 2000 +0200
@@ -12,6 +12,8 @@
 
 
 
+"{ Package: 'stx:libview2' }"
+
 Object subclass:#Menu
 	instanceVariableNames:'items groupSizes receiver'
 	classVariableNames:''
@@ -883,24 +885,24 @@
     "display the menu as a popUp; returns the value associated with the
      selected item, 0 if none was selected"
 
-    ^ (MenuPanel menu:self) startUp ? 0
+    ^ (MenuPanel menu:self) startUp "/ ? 0
 
 "   
-	|m|
+        |m|
 
-	m := #(#Menu #(
-			#(#MenuItem 
-				#rawLabel: 'left' 
-				#value: #left ) 
-			#(#MenuItem 
-				#rawLabel: 'center' 
-				#value: #center ) 
-			#(#MenuItem 
-				#rawLabel: 'right' 
-				#value: #right ) ) 
-		 #(2) 
-		nil 
-	) decodeAsLiteralArray.
+        m := #(#Menu #(
+                        #(#MenuItem 
+                                #rawLabel: 'left' 
+                                #value: #left ) 
+                        #(#MenuItem 
+                                #rawLabel: 'center' 
+                                #value: #center ) 
+                        #(#MenuItem 
+                                #rawLabel: 'right' 
+                                #value: #right ) ) 
+                 #(2) 
+                nil 
+        ) decodeAsLiteralArray.
 
       Transcript showCR:(m startUp)        
 "
@@ -934,10 +936,18 @@
 
     "Created: / 21.5.1998 / 14:15:21 / cg"
     "Modified: / 21.5.1998 / 14:17:46 / cg"
+!
+
+startUpOrNil
+    "display the menu as a popUp; returns the value associated with the
+     selected item, nil if none was selected"
+
+    ^ (MenuPanel menu:self) startUp
+
 ! !
 
 !Menu class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/Menu.st,v 1.43 2000-02-18 14:35:03 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/Menu.st,v 1.44 2000-04-01 14:29:49 cg Exp $'
 ! !