pipe

Alan Kay alan.kay at squeakland.org
Sun Aug 26 18:46:04 UTC 2007


But of course you can write your own version of a conditional that 
will work fine ....

Cheers,

Alan

-----------

At 09:09 AM 8/26/2007, UZONYI Levente wrote:
>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




More information about the Squeak-dev mailing list