unified #menuAt/#subMenuAt method names
authorClaus Gittinger <cg@exept.de>
Sun, 24 Mar 1996 19:00:23 +0100
changeset 518 731c905a6d89
parent 517 fc4ed55dcd35
child 519 404251fcfe2e
unified #menuAt/#subMenuAt method names
PopUpMenu.st
PullDMenu.st
PullDownMenu.st
--- a/PopUpMenu.st	Sun Mar 24 18:59:33 1996 +0100
+++ b/PopUpMenu.st	Sun Mar 24 19:00:23 1996 +0100
@@ -774,6 +774,14 @@
     ^ actionLines
 !
 
+menuAt:indexOrName
+    "return the submenu for entry indexOrName."
+
+    ^ self subMenuAt:indexOrName
+
+    "Created: 24.3.1996 / 17:11:05 / cg"
+!
+
 numberOfItems
     "return the number of items in the menu"
 
@@ -789,6 +797,14 @@
     menuView remove:indexOrName
 !
 
+subMenuAt:indexOrName
+    "return the submenu for entry indexOrName"
+
+    ^ menuView subMenuAt:indexOrName
+
+    "Created: 24.3.1996 / 17:09:15 / cg"
+!
+
 subMenuAt:indexOrName put:aMenu
     "define a submenu to be shown for entry indexOrName"
 
@@ -1098,5 +1114,5 @@
 !PopUpMenu class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/PopUpMenu.st,v 1.43 1996-03-08 13:45:20 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/PopUpMenu.st,v 1.44 1996-03-24 18:00:06 cg Exp $'
 ! !
--- a/PullDMenu.st	Sun Mar 24 18:59:33 1996 +0100
+++ b/PullDMenu.st	Sun Mar 24 19:00:23 1996 +0100
@@ -457,6 +457,14 @@
     self at:aString putMenu:menuView
 !
 
+at:aString putLabels:labels selectors:selectors
+    "create and set the menu under the title, aString"
+
+    ^ self at:aString putLabels:labels selectors:selectors receiver:nil
+
+    "Created: 24.3.1996 / 17:06:45 / cg"
+!
+
 at:aString putLabels:labels selectors:selectors args:args receiver:anObject
     "create and set the menu under the title, aString"
 
@@ -545,13 +553,11 @@
 !
 
 menuAt:stringOrNumber
-    "return the menu with the title; return nil if not found"
-
-    |index|
+    "return the menu with the title; nil if not found"
 
-    index := self indexOf:stringOrNumber.
-    (index == 0) ifTrue:[^ nil].
-    ^ menus at:index
+    ^ self subMenuAt:stringOrNumber
+
+    "Modified: 24.3.1996 / 17:10:11 / cg"
 !
 
 numberOfTitles:n
@@ -591,6 +597,18 @@
 
     selectors := selectorArray.
 
+!
+
+subMenuAt:stringOrNumber
+    "return the menu with the title; nil if not found."
+
+    |index|
+
+    index := self indexOf:stringOrNumber.
+    (index == 0) ifTrue:[^ nil].
+    ^ menus at:index
+
+    "Modified: 24.3.1996 / 17:09:56 / cg"
 ! !
 
 !PullDownMenu methodsFor:'accessing-look'!
@@ -1385,5 +1403,5 @@
 !PullDownMenu class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/Attic/PullDMenu.st,v 1.43 1996-03-23 16:21:25 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/Attic/PullDMenu.st,v 1.44 1996-03-24 18:00:23 cg Exp $'
 ! !
--- a/PullDownMenu.st	Sun Mar 24 18:59:33 1996 +0100
+++ b/PullDownMenu.st	Sun Mar 24 19:00:23 1996 +0100
@@ -457,6 +457,14 @@
     self at:aString putMenu:menuView
 !
 
+at:aString putLabels:labels selectors:selectors
+    "create and set the menu under the title, aString"
+
+    ^ self at:aString putLabels:labels selectors:selectors receiver:nil
+
+    "Created: 24.3.1996 / 17:06:45 / cg"
+!
+
 at:aString putLabels:labels selectors:selectors args:args receiver:anObject
     "create and set the menu under the title, aString"
 
@@ -545,13 +553,11 @@
 !
 
 menuAt:stringOrNumber
-    "return the menu with the title; return nil if not found"
-
-    |index|
+    "return the menu with the title; nil if not found"
 
-    index := self indexOf:stringOrNumber.
-    (index == 0) ifTrue:[^ nil].
-    ^ menus at:index
+    ^ self subMenuAt:stringOrNumber
+
+    "Modified: 24.3.1996 / 17:10:11 / cg"
 !
 
 numberOfTitles:n
@@ -591,6 +597,18 @@
 
     selectors := selectorArray.
 
+!
+
+subMenuAt:stringOrNumber
+    "return the menu with the title; nil if not found."
+
+    |index|
+
+    index := self indexOf:stringOrNumber.
+    (index == 0) ifTrue:[^ nil].
+    ^ menus at:index
+
+    "Modified: 24.3.1996 / 17:09:56 / cg"
 ! !
 
 !PullDownMenu methodsFor:'accessing-look'!
@@ -1385,5 +1403,5 @@
 !PullDownMenu class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/PullDownMenu.st,v 1.43 1996-03-23 16:21:25 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/PullDownMenu.st,v 1.44 1996-03-24 18:00:23 cg Exp $'
 ! !