#FEATURE by cg
authorClaus Gittinger <cg@exept.de>
Thu, 10 May 2018 21:06:39 +0200
changeset 6318 8cf42e7015f5
parent 6317 162eab34215c
child 6319 beb48f66edf1
#FEATURE by cg class: MenuView added: #addLabel:selector:action: #addSeparator
MenuView.st
--- a/MenuView.st	Thu May 10 12:24:31 2018 +0200
+++ b/MenuView.st	Thu May 10 21:06:39 2018 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
@@ -550,6 +552,14 @@
     "Modified: 28.2.1996 / 17:54:11 / cg"
 !
 
+addLabel:aLabel selector:aSelector action:aBlock
+    "add another label/selector pair at the end"
+
+    self 
+        addLabel:aLabel selector:aSelector after:nil;
+        actionAt:aSelector put:aBlock
+!
+
 addLabel:aLabel selector:aSelector after:aLabelOrSelectorOrNumber 
     "insert another label/selector pair at some place.
      Being very friendly here, allowing label-string, selector or numeric
@@ -1080,6 +1090,13 @@
     "Modified: 28.2.1996 / 17:50:14 / cg"
 !
 
+addSeparator
+    "add a separating line at the END.
+     compatibility with Menu"
+
+    self addSeparatingLine
+!
+
 args
     "return the argument array"