[Pharo-dev] Announcer problem :)

Stéphane Ducasse stephane.ducasse at inria.fr
Sun Aug 4 11:19:53 EDT 2013

So igor is thinking about ephemerons and object formats.
Because we are going over all the weak on:do: and rewriting the ones we can.

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 | 
		cull: announcement newContents
		cull: announcement oldContents
		cull: announcement
		cull: ann ].
	listAnnouncer weak
		on: ValueChanged
		do: block

On Aug 4, 2013, at 4:16 PM, Stéphane Ducasse <Stephane.Ducasse at inria.fr> wrote:

> addDependent: anObject
> 	self announcer 
> 		on: MorphChanged
> 		do: [ :ann | anObject update: ann selector ].
> 	self announcer 
> 		on: MorphChangedWithArguments
> 		do: [ :ann | anObject update: ann selector with: ann arguments ].
> 	^ anObject
> is an example of the problem because addDependent: was holding also weakly its dependent and now
> we cannot use weak with blocks.
> Stef

More information about the Pharo-dev mailing list