Subject: D2009 : Replace in file function will mess up code - Critical [Print This Page]
Author:
swierzbicki Time: 2009-2-18 06:24 Subject: D2009 : Replace in file function will mess up code - Critical
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 ]
Author:
Passion Time: 2009-2-18 10:12
Thanks for your report. We'll check this problem.
Author:
swierzbicki Time: 2009-2-18 15:41
Thank you passion, I will wait for future nightly build
Thank you again for providing us with such a great tool !
Author:
Passion Time: 2009-2-18 21:05
It's a Unicode String problem in Delphi 2009. Now we fixed it.
Please try the latest 0.9.1.484 nightly build?
Author:
swierzbicki Time: 2009-2-19 05:11
Wooow, you are really fast at code fixing !
Looks like the new nightly build is well working.
Thank you
Welcome to CnPack Forum (http://bbs.cnpack.org/) |
Powered by Discuz! 5.0.0 |