Removing a method...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Removing a method...

Tony Giaccone-2

I'm working with the SeaSide Squeak Image.   5.8-578.

Try as I might to be prefect. Sometimes I make a mistake and create a  
method with a signature it shouldn't have. So I try to use the  
"Refactor Method-> remove",  menu selection.


When I do this, I get a waring about  "Browse References".

If I say no, nothing seems to happen.


I I say yes, I get a References To: browser with pointers to other  
classes where a method (message?) with the same signature is used  
However, none of those references will ever be to my class, they are  
made against classes that already exists.

I don't want to touch those references, but I do want to remove my  
method.

How do I do that? It's totally not clear to me.



Tony
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Removing a method...

Hilaire Fernandes-4
Le lundi 10 novembre 2008 à 02:23 -0500, Tony Giaccone a écrit :

>
> I I say yes, I get a References To: browser with pointers to other  
> classes where a method (message?) with the same signature is used  
> However, none of those references will ever be to my class, they are  
> made against classes that already exists.
>
> I don't want to touch those references, but I do want to remove my  
> method.
>
> How do I do that? It's totally not clear to me.

Yep, I guess when you are using the remove method from the refactoring
tools, it will just make not possible to remove the method as long as
there are places where this method name (message) is used.
In that case, you can just use the non-refactoring remove tool from the
same popup menu. The menu item is "remove...(x)". When the method is
selected you can also use the [alt]+[x] shortcut.

You may found that you do not need to use the refactoring version to
remove a method, but more when you want to rename a message. In that
latter, you have to be careful to rename your message use and not ones
from other method with the same name. Hum, not sure it sounds clear.


Hilaire

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

signature.asc (196 bytes) Download Attachment