[Pharo-project] removeSelector:

Stéphane Ducasse stephane.ducasse at inria.fr
Tue Nov 23 16:00:10 CET 2010


On Nov 23, 2010, at 12:48 PM, Benjamin wrote:

> Hello guys,
> 
> regarding that comment of SmalltalkImage>>#removeSelector: is 
> 
> "Safely remove a selector from a class (or metaclass). If the
> 	class or the method doesn't exist anymore, never mind and
> 	answer nil.
> 	This method should be used instead of 'Class removeSelector:
> 	#method' to omit global class references."
> 
> maybe Behavior>>#removeSelector: sould be deprecated ?

not really

in fact the other one is a hack. I imagine that this is more to make sure you write
Smalltalk removeSelector: #foo instead of MyClass removeSelector: #foo.

I'm not sure that this is used in fact.
Stef





More information about the Pharo-project mailing list