On Sun, 26 Aug 2007, Fabio Filasieno wrote:
> Thanks leves ... :-) ...! You rock !
> I didn't know about the MessageCatcher.
>
> Really really close .... as this fails.
>
> | collection |
> collection := OrderedCollection new.
> collection add:10; add:20; add:30.
> 10 pipe: [:item | item + 1 ; + 1; > 10 ; ifTrue: [#True] ifFalse:
> [#False] <- No special messages expected ->]
>
>
> Fabio
>
>
>
Some messages can not be cascaded, and special messages like
#ifTrue:ifFalse: can not be catched by MessageCatcher.
I don't know if other smalltalks have the same behavior, or not.
If MessageCatcher could catch messages like #ifTrue:ifFalse:, then one
could simply use the following workaround, even if the message can't be
cascaded:
10 pipe: [:item | item + 1 ; + 1; > 10. item ifTrue: [#True] ifFalse:
[#False] ]
(I know it breaks the "pipe theory" :))
Levente