[Newbies] Re: Global string search and replace in an image

Andy Burnett andy.burnett at knowinnovation.com
Tue Sep 11 12:48:53 UTC 2012


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.

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

Cheers
Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20120911/b602dbda/attachment.htm


More information about the Beginners mailing list