[Pharo-project] Announcer methods are bloated

DougEdmunds dougedmunds at gmail.com
Wed Apr 20 00:00:59 CEST 2011


I'd vote to keep the subscribe:do: and subscribe:send:to methods, since that
seems to most clearly identify what they are doing.  Maybe better would be
subscribeTo:do: and subscribeTo:send:to:

A good example is the instance var 'announcer' in PragmaCollector which
holds requests to receive (subscriptions to) 'PragmaAnnouncement' and to
'PragmaCollectorReset' announcements. 

subscribe: anAnnouncement send: aSelector to: anObject
	"see Announcements packages"
	self announcer subscribe: anAnnouncement send: aSelector to: anObject


whenChangedSend: aSelector to: anObject
	"record a change listener"
	self subscribe: PragmaAnnouncement send: aSelector to: anObject

whenResetSend: aSelector to: anObject
	"record a change listener"
	self subscribe: PragmaCollectorReset send: aSelector to: anObject




--
View this message in context: http://forum.world.st/Announcer-methods-are-bloated-tp3461131p3461644.html
Sent from the Pharo Smalltalk mailing list archive at Nabble.com.



More information about the Pharo-project mailing list