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

Tudor Girba tudor at tudorgirba.com
Wed Aug 28 05:56:55 EDT 2013


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"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20130828/ecbd9845/attachment-0002.html>


More information about the Pharo-dev mailing list