[Seaside-dev] WATagBrush>>class:if: with boolean and additional
blocks
Torsten Bergmann
astares at gmx.de
Mon Dec 30 11:31:28 UTC 2013
WATagBrush>>class:if: is implemented like this:
class: aString if: aBoolean
"Adds the class aString to the receiving element if aBoolean is true.
Example:
html div
class: 'error' if: self hasError;
with: self errorMessage"
aBoolean
ifTrue: [ self class: aString ]
What about changing it to:
class: aString if: aBooleanOrBlock
...
aBooleanOrBlock value
ifTrue: [ self class: aString ]
This way one could use a boolean as before but also a conditional block coming from
elsewhere. This change would also be backward compatible and not break existing code.
What do you think?
Thx
T.
More information about the seaside-dev
mailing list