[Newbies] Re: Global string search and replace in an image
karlramberg at gmail.com
Tue Sep 11 17:45:15 UTC 2012
On Tue, Sep 11, 2012 at 2:48 PM, Andy Burnett
<andy.burnett at knowinnovation.com> wrote:
>> I thought Andy was talking about source code.
>> Personally, if I have to rename a method, I search for all senders and fix
>> them with copy&paste. Same for class renames, inst var renames, etc. There
>> just are not that many occurrences, so fixing each one individually is
>> quick, plus I get to verify that the change is indeed what I wanted.
>> There is a tool to automate a lot of this called the Refactoring Browser,
>> which many developers like, but I don't even have it in my image.
> Thanks very much to both of you.
> Bert, you are quite right, I was talking about changing strings in source
> code - sorry, I should have made that clear.
> The problem is that we I am dealing with an image where a number of strings
> have been hard coded into various methods. What I was looking for was a
> global - source code - search and replace. Does that exist? Or, is it
> possible to FileOut the entire source tree, do a search and replace
> externally, and then file it in again. I have tried this in the past, but
> the image never seems to work properly afterwards.
If you select the string in the method pane and press alt + e you get
a browser with all occurrences of the selected string
> Clearly, the correct way to solve the problem is to abstract the hard coded
> text into another object - or maybe a global variable? Perhaps I will just
> have to bite the bullet. This would make it far easier for
> internationalisation etc. Actually, are there any packages to help with
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
More information about the Beginners