#DOCUMENTATION by cg
class: BlockValue class
comment/format in:
#block:arguments:
#forLogical:and:
#forLogical:and:and:
#forLogical:or:
#forLogical:or:or:
#forLogicalAndAll:
#forLogicalNot:
#forLogicalOrAll:
#forValue:equalTo:
#with:argument:
#with:argument:argument:
#with:argument:argument:argument:
#with:argument:argument:argument:argument:
#with:arguments:
--- a/BlockValue.st Wed Feb 26 18:06:12 2020 +0100
+++ b/BlockValue.st Thu Feb 27 16:08:38 2020 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1995 by Claus Gittinger
All Rights Reserved
@@ -207,77 +209,77 @@
!BlockValue class methodsFor:'instance creation'!
-block:aBlock arguments:aCollectionOfArguments
+block:aBlock arguments:aCollectionOfValueModels
"return a new BlockValue computing aBlock.
Same as #with:arguments: for ST80 compatibility"
- ^ self with:aBlock arguments:aCollectionOfArguments
+ ^ self with:aBlock arguments:aCollectionOfValueModels
"Created: / 20.6.1998 / 14:00:16 / cg"
!
-forLogical:arg1 and:arg2
+forLogical:valueModel1 and:valueModel2
"return a new BlockValue computing the logical AND of its args
(which are usually other valueHolders)"
^ (self new)
setBlock:[:a :b | a value and:[b value]]
- arguments:(Array with:arg1 with:arg2)
+ arguments:(Array with:valueModel1 with:valueModel2)
"Created: / 16.12.1995 / 19:20:14 / cg"
"Modified: / 30.1.2000 / 23:24:50 / cg"
!
-forLogical:arg1 and:arg2 and:arg3
+forLogical:valueModel1 and:valueModel2 and:valueModel3
"return a new BlockValue computing the logical AND of its args
(which are usually other valueHolders)"
^ (self new)
setBlock:[:a :b :c | a value and:[b value and:[c value]]]
- arguments:(Array with:arg1 with:arg2 with:arg3)
+ arguments:(Array with:valueModel1 with:valueModel2 with:valueModel3)
!
-forLogical:arg1 or:arg2
+forLogical:valueModel1 or:valueModel2
"return a new BlockValue computing the logical OR of its args
(which are usually other valueHolders)"
^ (self new)
setBlock:[:a :b | a value or:[b value]]
- arguments:(Array with:arg1 with:arg2)
+ arguments:(Array with:valueModel1 with:valueModel2)
"Created: / 16.12.1995 / 19:20:14 / cg"
"Modified: / 30.1.2000 / 23:24:46 / cg"
!
-forLogical:arg1 or:arg2 or:arg3
+forLogical:valueModel1 or:valueModel2 or:valueModel3
"return a new BlockValue computing the logical OR of its args
(which are usually other valueHolders)"
^ (self new)
setBlock:[:a :b :c | a value or:[b value or:[c value]]]
- arguments:(Array with:arg1 with:arg2 with:arg3)
+ arguments:(Array with:valueModel1 with:valueModel2 with:valueModel3)
!
-forLogicalAndAll:argArray
+forLogicalAndAll:arrayOfValueModels
"return a new BlockValue computing the logical AND of all elements
in the passed argArray (which are usually other valueHolders)"
^ (self new)
- setBlock:[:a | (argArray findFirst:[:a | a value not]) == 0]
- argumentArray:argArray asArray
+ setBlock:[:a | (arrayOfValueModels findFirst:[:a | a value not]) == 0]
+ argumentArray:arrayOfValueModels asArray
"Created: / 22.1.1997 / 19:12:44 / cg"
"Modified: / 28.4.1998 / 20:16:38 / ca"
"Modified: / 30.1.2000 / 23:24:40 / cg"
!
-forLogicalNot:arg
+forLogicalNot:aValueModel
"return a new BlockValue computing the logical NOT of its arg
(which is usually another valueHolder)"
^ (self new)
setBlock:[:a | a not]
- arguments:(Array with:arg)
+ arguments:(Array with:aValueModel)
"
|v1 v2|
@@ -299,20 +301,20 @@
"Modified: / 18-07-2018 / 20:33:18 / Claus Gittinger"
!
-forLogicalOrAll:argArray
+forLogicalOrAll:arrayOfValueModels
"return a new BlockValue computing the logical OR of all elements
in the passed argArray (which are usually other valueHolders)"
^ (self new)
setBlock:[:arg | (arg findFirst:[:el | el value]) ~~ 0]
- argumentArray:argArray asArray
+ argumentArray:arrayOfValueModels asArray
"Created: / 22.1.1997 / 19:13:01 / cg"
"Modified: / 28.4.1998 / 20:20:09 / ca"
"Modified: / 30.1.2000 / 23:24:34 / cg"
!
-forValue:someValue equalTo:someConstant
+forValue:someValueModel equalTo:someConstant
"return a new BlockValue generating a true,
if someValue (usually another holder) contains a value equal to someConstant.
Useful, if the other valueHolder is a radioButton group model,
@@ -321,7 +323,7 @@
^ (self new)
setBlock:[:a | a = someConstant]
- arguments:(Array with:someValue)
+ arguments:(Array with:someValueModel)
"
|v1 v2|
@@ -348,48 +350,48 @@
"Created: 16.12.1995 / 19:16:33 / cg"
!
-with:aBlock argument:anArgument
+with:aBlock argument:aValueModel
"return a new BlockValue computing aBlock"
^ (self new)
setBlock:aBlock
- arguments:(Array with:anArgument)
+ arguments:(Array with:aValueModel)
"Created: 16.12.1995 / 19:20:14 / cg"
!
-with:aBlock argument:anArgument1 argument:anArgument2
+with:aBlock argument:valueModel1 argument:valueModel2
"return a new BlockValue computing aBlock"
^ (self new)
setBlock:aBlock
- arguments:(Array with:anArgument1 with:anArgument2)
+ arguments:(Array with:valueModel1 with:valueModel2)
"Created: 16.12.1995 / 19:20:14 / cg"
!
-with:aBlock argument:anArgument1 argument:anArgument2 argument:anArgument3
+with:aBlock argument:valueModel1 argument:valueModel2 argument:valueModel3
"return a new BlockValue computing aBlock"
^ (self new)
setBlock:aBlock
- arguments:(Array with:anArgument1 with:anArgument2 with:anArgument3)
+ arguments:(Array with:valueModel1 with:valueModel2 with:valueModel3)
!
-with:aBlock argument:anArgument1 argument:anArgument2 argument:anArgument3 argument:anArgument4
+with:aBlock argument:valueModel1 argument:valueModel2 argument:valueModel3 argument:valueModel4
"return a new BlockValue computing aBlock"
^ (self new)
setBlock:aBlock
- arguments:(Array with:anArgument1 with:anArgument2 with:anArgument3 with:anArgument4)
+ arguments:(Array with:valueModel1 with:valueModel2 with:valueModel3 with:valueModel4)
!
-with:aBlock arguments:aCollectionOfArguments
+with:aBlock arguments:aCollectionOfValueModels
"return a new BlockValue computing aBlock"
^ (self new)
setBlock:aBlock
- arguments:aCollectionOfArguments
+ arguments:aCollectionOfValueModels
"Created: 16.12.1995 / 19:20:14 / cg"
! !