# HG changeset patch # User Claus Gittinger # Date 827690423 -3600 # Node ID 731c905a6d89404d04b6690a98fb48779264ad58 # Parent fc4ed55dcd350f0a69a82f92f4d3243c3509778f unified #menuAt/#subMenuAt method names diff -r fc4ed55dcd35 -r 731c905a6d89 PopUpMenu.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 $' ! ! diff -r fc4ed55dcd35 -r 731c905a6d89 PullDMenu.st --- 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 $' ! ! diff -r fc4ed55dcd35 -r 731c905a6d89 PullDownMenu.st --- 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 $' ! !