Cascading ?
Damien Cassou
damien.cassou at laposte.net
Thu Aug 17 10:32:59 UTC 2006
Hilaire Fernandes wrote:
> Damien Cassou a écrit :
>> Klaus D. Witzel wrote:
>>> On Thu, 17 Aug 2006 11:12:36 +0200, Damien Cassou wrote:
>>>
>>>> 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.
>>
>> Maybe my example was not clear enough:
>>
>> test:= MyObjectModel
>> test
>> getAllChanges;
>> storageStrategy storeNow;
>> readyToContinue
>>
>> I think it is clear that #storeNow is sent to the result of 'test
>> storageStrategy'. And #readyToContinue should still be sent to 'test' so
>> brackets are not possible in this example.
>
>
> I think storeNow is sent to storageStrategy, then the returned object
> from this message call, which should be a message symbol, is sent to test.
> May be it should be written
>
> test:= MyObjectModel
> (test
> getAllChanges;
> storageStrategy) storeNow.
> test readyToContinue
I know how to make it work in fact. What I don't understand is why the
smalltalk doesn't allow this kind of construction.
More information about the Squeak-dev
mailing list
|