--- a/Menu.st Thu Sep 29 13:19:54 2011 +0200
+++ b/Menu.st Fri Oct 07 21:46:48 2011 +0200
@@ -362,6 +362,24 @@
"Modified: / 30-06-2011 / 10:51:50 / cg"
!
+menuItemWithKey:aValue
+ "return the menuItem for the given key; nil if no such item is in the menu.
+ Searches all items (i.e. also submenu items)"
+
+ self
+ allItemsDo:[:anItem |
+
+ (anItem nameKey = aValue) ifTrue:[
+ ^ anItem
+ ].
+ ].
+ ^ nil
+
+ "Created: / 19-04-2011 / 14:42:18 / cg"
+ "Modified: / 30-06-2011 / 10:51:50 / cg"
+ "Created: / 07-10-2011 / 15:04:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
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)"
@@ -1218,5 +1236,5 @@
!Menu class methodsFor:'documentation'!
version_CVS
- ^ '$Header: /cvs/stx/stx/libview2/Menu.st,v 1.81 2011-06-30 09:19:00 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/Menu.st,v 1.82 2011-10-07 19:46:48 vrany Exp $'
! !