[Pharo-dev] a weak on:do:/when:do:

Igor Stasenko siguctua at gmail.com
Wed Aug 28 11:08:06 EDT 2013


there is something sick in this code..
using block to transform evaluation of another block :(


On 28 August 2013 15:40, Stéphane Ducasse <stephane.ducasse at inria.fr> wrote:

> The mail was more that I would prefer to have less block inside block and
> cull:
>
>
> On Aug 28, 2013, at 1:14 PM, Tudor Girba <tudor at tudorgirba.com> wrote:
>
> That is what I knew, too. I asked because the mail seemed to suggest that
> it would work :).
>
> Doru
>
>
> On Wed, Aug 28, 2013 at 12:54 PM, Esteban Lorenzano <estebanlm at gmail.com>wrote:
>
>> no, it is not.
>> that will keep the registry forever because it acts over a block (no
>> ephemerons, remember)
>>
>> Esteban
>>
>> On Aug 28, 2013, at 11:56 AM, Tudor Girba <tudor at tudorgirba.com> wrote:
>>
>> Does this work?
>>
>> Doru
>>
>>
>> On Wed, Aug 28, 2013 at 11:54 AM, Stéphane Ducasse <
>> stephane.ducasse at inria.fr> wrote:
>>
>>> whenListChanged: aBlock
>>>         "Specify a block to value after the contents of the list has
>>> changed"
>>>
>>>         "Basically when you set a new list of items"
>>>
>>>         <api: #event>
>>>         | block |
>>>         block := [ :announcement :ann |
>>>         aBlock
>>>                 cull: announcement newContents
>>>                 cull: announcement oldContents
>>>                 cull: announcement
>>>                 cull: ann ].
>>>         listAnnouncer weak
>>>                 when: ValueChanged
>>>                 do: block
>>>
>>>
>>
>>
>> --
>> www.tudorgirba.com
>>
>> "Every thing has its own flow"
>>
>>
>>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
>
>
>


-- 
Best regards,
Igor Stasenko.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20130828/1e4fd49d/attachment-0002.html>


More information about the Pharo-dev mailing list