[Seaside-dev] WATagBrush>>class:if: with boolean and additional
blocks
Johan Brichau
johan at inceptive.be
Mon Dec 30 11:44:04 UTC 2013
I’m very much in favour of that.
Similarly, we added a method #scriptBlock:if: to prevent generation of a script instead of only preventing its attachment.
I don’t like the name we chose, but the concept is something I would like to push to Seaside too.
On 30 Dec 2013, at 12:31, Torsten Bergmann <astares at gmx.de> wrote:
> 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.
> _______________________________________________
> seaside-dev mailing list
> seaside-dev at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
More information about the seaside-dev
mailing list