class: Menu
changed: #asOldStylePopUpMenuFor:
fix for menuItems with a block as itemValue
--- a/Menu.st Thu Sep 12 10:30:38 2013 +0200
+++ b/Menu.st Thu Sep 12 11:30:17 2013 +0200
@@ -790,7 +790,20 @@
].
].
- menuView actions:(itemsShown collect:[:each | [ receiver perform:each value ]]).
+ menuView actions:(itemsShown
+ collect:[:each |
+ [
+ |actionOrSymbol|
+
+ actionOrSymbol := each itemValue.
+ actionOrSymbol isBlock ifTrue:[
+ actionOrSymbol value
+ ] ifFalse:[
+ receiver perform:actionOrSymbol
+ ]
+ ]
+ ]
+ ).
^ PopUpMenu forMenu:menuView
@@ -1275,6 +1288,6 @@
!Menu class methodsFor:'documentation'!
version_CVS
- ^ '$Header: /cvs/stx/stx/libview2/Menu.st,v 1.89 2013-09-01 15:46:21 vrany Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/Menu.st,v 1.90 2013-09-12 09:30:17 cg Exp $'
! !