Cascading ?
Klaus D. Witzel
klaus.witzel at cobss.com
Thu Aug 17 09:42:45 UTC 2006
On Thu, 17 Aug 2006 11:12:36 +0200, Damien Cassou wrote:
> Hi,
>
> I'm wondering why the following code does not compile and answers
> 'Nothing more expected':
>
> test:=OrderedCollection with: 'first'.
> test
> add: 'second';
> size negated
>
(test add: 'second'; size) negated is what you can do with the result of
your cascaded messages.
> It seems we can't send another message to size !
Sure, you can. But when you cascade messages, you have two receivers: the
cascade receiver and the cascade result. Think that the compiler wants you
to tell which one you mean.
> Can somebody explain this to me please ?
HTH.
/Klaus
More information about the Squeak-dev
mailing list
|