[KCP] Event notification call for feedback

Roel Wuyts Roel.Wuyts at ulb.ac.be
Wed Nov 5 09:59:11 UTC 2003


For all events except for removals you have access to the element that 
was 'changed'. So, for example, when a method is added, you can ask 
that event for the method that was added:

	"registering for a specific event"
	notifier
		notify: self
		ofSystemChangesOfItem: #class
		change: #Added
		using: #methodAddedEvent:.


	"in the method #methodAddedEvent: event "
	event item   		"to get the class, category, method, .... - whatever 
was just added"

Dito for all other kinds of notifications, except for removals. For 
removals it is different since the element was removed. Although I 
could keep them around, I preferred to just give the name of the 
element that was just removed instead.


On Tuesday, Nov 4, 2003, at 19:08 Europe/Zurich, Adam Spitz wrote:

> ducasse <ducasse at iam.unibe.ch> wrote:
>
>> we would like to get some feedback on the event notification system
>> that roel developed.
>
> What I'd like for my Registries code is the ability to say, "Notify me
> whenever a CompiledMethod satisfying this criterion" (in my case, a
> CompiledMethod containing a <register: #(foo)> annotation) "is added or
> removed or overwritten."
>
> Right now, if I remember correctly, my problem is that the notification
> system only gives me access to the CompiledMethod for an Added event; I
> also need to be able to see the CompiledMethod that's being removed 
> (for
> a Removed event) or overwritten (for an Added event that overwrites an
> existing method).
>
>
> Adam
>
>
Roel Wuyts                                                              
   DeComp
roel.wuyts at ulb.ac.be                               Université Libre de 
Bruxelles
http://homepages.ulb.ac.be/~rowuyts/                                    
Belgique
Board Member of the European Smalltalk User Group: www.esug.org




More information about the Squeak-dev mailing list