[Pharo-project] removeSelector:

Benjamin benjamin.vanryseghem.pharo at gmail.com
Tue Nov 23 16:17:01 CET 2010


On Nov 23, 2010, at 4:00 PM, Stéphane Ducasse wrote:

>
> 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
>

Ok, so maybe we should add a comment in Behavior>>#removeSelector: to  
precise we should now use SmalltalkImage>>#removeSelector: instead ?

Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/pharo-project/attachments/20101123/0bc679bf/attachment.htm>


More information about the Pharo-project mailing list