#FEATURE by stefan
authorStefan Vogel <sv@exept.de>
Fri, 31 Mar 2017 15:51:37 +0200
changeset 3945 6219257414cf
parent 3944 4d859e0633c6
child 3946 3aa94b58d2b0
#FEATURE by stefan class: BlockValue added: #setArguments:
BlockValue.st
--- a/BlockValue.st	Sat Mar 18 16:43:31 2017 +0100
+++ b/BlockValue.st	Fri Mar 31 15:51:37 2017 +0200
@@ -375,6 +375,26 @@
 
 !BlockValue methodsFor:'accessing'!
 
+setArguments:aCollectionOfArguments
+    "set the receiver's arguments to be passed to it.
+     A change in any of the arguments will force reevaluation of the action
+     block - possibly generating another change from myself"
+
+    arguments notNil ifTrue:[
+        self release
+    ].
+    arguments := aCollectionOfArguments.
+    arguments do:[:arg |
+        "arg maybe some constant..."
+        arg notNil ifTrue:[
+            arg addDependent:self
+        ].
+    ].
+    self recomputeValue.
+
+    "Created: / 30-03-2017 / 14:00:27 / stefan"
+!
+
 setBlock:aBlock
     "set the receiver's action block"