[Lazarus] Renaming files within a project after creation

Graeme Geldenhuys graemeg.lists at gmail.com
Sat Aug 23 09:35:20 CEST 2008


On Fri, Aug 22, 2008 at 7:15 PM, Tom Verhoeff <T.Verhoeff at tue.nl> wrote:
> What about changing it afterwards?  Issue: consistency.
> Some files may use others (either in a uses clause or via an include).
> The renaming should be carried out consistently throughout the
> project.  Note that the .lpi file also contains file names.

I do the following...since Delphi 4 days.


1)  Open the Unit in editor.  Then "File | Save As..".  This takes
care of the file name, "unit" line inside the file and the .lpi file.

2)  Delete the the old name .dcu file.

3) Delete (or move/backup) the old file.

4) Do a "Build All" and fix the uses clauses as the compiler complains.

You're done!  :-)

Steps 2 & 3 are important, otherwise the compiler will (sometimes)
still find the old .dcu and allow compiling without errors.


Regards,
 - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/



More information about the Lazarus mailing list