Hi,
When using the Replace in file function in D2009, all impacted files will be totally messed up !
Example:Create a new vcl application and don't save it
This will generate something like that (I'm using a French version of Delphi, see remarks with accentuated characters):
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm2 = class(TForm)
private
{ Déclarations privées }
public
{ Déclarations publiques }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
end.
Now, in the CNPack menu choose "Replace in file" function
In "search for" add Déclarations
In "Replace with" add Dèclarations
In range select "Files in project group(2)"
Click Replace and validate by hitting the Yes button
Notice that you will get an error message telling you that the dproj file doesn't exists (well, that's normal since my project wasn't saved)and asking you to continue. Select yes.
You will get now a dialog box telling you that the replacement was completed on : 1 file, 2 replacements
The unit code is now totally messed and will look like :
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm2 = class(TForm)
private
{ D
Note that it stopped at the accentuated character 'è'. I guess you have issue with Unicode data.
Note also that CTRL-Z (undo) isn't working so it is impossible to get its old code !
This is a critical issue.
BR
Stephan
[
Last edited by swierzbicki at 2009-2-18 15:39 ]