Menu.st
changeset 2918 44a68f3ffba5
parent 2917 2ba0fee85a7f
child 2952 1cedbbc95433
--- a/Menu.st	Thu Jun 30 10:39:01 2011 +0200
+++ b/Menu.st	Thu Jun 30 11:19:00 2011 +0200
@@ -217,8 +217,8 @@
 
 atMenuItemLabeled:aString putSubmenu:aMenu visible:visible
     (self menuItemLabeled:aString)
-        subMenu:aMenu;
-        visible:visible
+        submenu:aMenu;
+        isVisible:visible
 
     "Created: / 30-06-2011 / 10:30:22 / cg"
 !
@@ -309,69 +309,75 @@
     "Modified: / 2.2.1998 / 13:28:19 / cg"
 !
 
-menuItemAt:index
+menuItemAt:index 
     "gets the menu item at the given index. When the index is out of bounds
-     nil is returned
-    "
-    (index > 0 and:[index <= items size]) ifTrue:[
-	^ items at:index
+     nil is returned"
+    
+    (index > 0 and:[ index <= items size ]) ifTrue:[
+        ^ items at:index
     ].
-  ^ nil
+    ^ nil
+
+    "Modified: / 30-06-2011 / 10:51:39 / cg"
 !
 
-menuItemLabeled:anItemLabel
+menuItemLabeled:anItemLabel 
     "return the menuItem for the given nameKey; nil if no such item is in the menu.
      Searches all items (i.e. also submenu items)"
-
-    self allItemsDo:[:anItem|
-		|l|
+    
+    self 
+        allItemsDo:[:anItem | 
+            |l|
 
-		((l := anItem label) sameAs: anItemLabel) ifTrue:[
-		    ^ anItem
-		].
-		(l includes:$&) ifTrue:[
-		    ((l copyWithout:$&) sameAs: anItemLabel) ifTrue:[
-			^ anItem
-		    ]
-		]
-	     ].
+            ((l := anItem label) sameAs:anItemLabel) ifTrue:[
+                ^ anItem
+            ].
+            (l includes:$&) ifTrue:[
+                ((l copyWithout:$&) sameAs:anItemLabel) ifTrue:[
+                    ^ anItem
+                ]
+            ]
+        ].
     ^ nil
 
-    "Created: / 13.9.1997 / 10:25:16 / cg"
-    "Modified: / 27.10.1997 / 15:23:33 / cg"
+    "Created: / 13-09-1997 / 10:25:16 / cg"
+    "Modified: / 30-06-2011 / 10:51:44 / cg"
 !
 
-menuItemWithArgument:aValue
+menuItemWithArgument:aValue 
     "return the menuItem for the given value; nil if no such item is in the menu.
      Searches all items (i.e. also submenu items)"
-
-    self allItemsDo:[:anItem|
-                |l|
+    
+    self 
+        allItemsDo:[:anItem | 
+            |l|
 
-                (anItem argument = aValue) ifTrue:[
-                    ^ anItem
-                ].
-             ].
+            (anItem argument = aValue) ifTrue:[
+                ^ anItem
+            ].
+        ].
     ^ nil
 
     "Created: / 19-04-2011 / 14:42:18 / cg"
+    "Modified: / 30-06-2011 / 10:51:50 / cg"
 !
 
-menuItemWithValue:aValue
+menuItemWithValue:aValue 
     "return the menuItem for the given value; nil if no such item is in the menu.
      Searches all items (i.e. also submenu items)"
-
-    self allItemsDo:[:anItem|
-                |l|
+    
+    self 
+        allItemsDo:[:anItem | 
+            |l|
 
-                (anItem value == aValue) ifTrue:[
-                    ^ anItem
-                ].
-             ].
+            (anItem value == aValue) ifTrue:[
+                ^ anItem
+            ].
+        ].
     ^ nil
 
-    "Created: / 13.9.1997 / 10:25:16 / cg"
-    "Modified: / 27.10.1997 / 15:23:33 / cg"
+    "Created: / 13-09-1997 / 10:25:16 / cg"
+    "Modified: / 30-06-2011 / 10:51:56 / cg"
 !
 
 menuItems
@@ -1212,5 +1218,5 @@
 !Menu class methodsFor:'documentation'!
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview2/Menu.st,v 1.80 2011-06-30 08:39:01 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/Menu.st,v 1.81 2011-06-30 09:19:00 cg Exp $'
 ! !