Regular expl/Repl format does not work in this case, why?
Posted: Thu Oct 02, 2008 3:43 pm
I am trying to use reg. expr and repl. format, on two almost identical test files, and the behavior is not correct (I guess).
I've posted some files here:
http://www.cyamon.com/zip/wildedit.zip
The image shows what reg.expr/repl. format I am using.
If you load the ''Working.pas'' file (in the test pane) and hit F4, you'll see that:
while ((Dir <> '') or (Drive <> '')) and (WideCanvasTextWidth(Canvas, Result) > MaxLen) do
is correcly replaced by:
while ((Dir <> '') or (Drive <> '')) and (Canvas.TextWidth(Result) > MaxLen) do
begin
Now, if you load the NotWorking.pas file, which is identical to the previous one except that there is more text /after/ the ''replacement'' point, and hit F4, then you wil get this:
while ((Dir <> '') or (Drive <> '')) and (Canvas, Result) > MaxLen) do
begin
Which is different from the previous case! I don't understand this.
Thank you for helping.
Chris
I've posted some files here:
http://www.cyamon.com/zip/wildedit.zip
The image shows what reg.expr/repl. format I am using.
If you load the ''Working.pas'' file (in the test pane) and hit F4, you'll see that:
while ((Dir <> '') or (Drive <> '')) and (WideCanvasTextWidth(Canvas, Result) > MaxLen) do
is correcly replaced by:
while ((Dir <> '') or (Drive <> '')) and (Canvas.TextWidth(Result) > MaxLen) do
begin
Now, if you load the NotWorking.pas file, which is identical to the previous one except that there is more text /after/ the ''replacement'' point, and hit F4, then you wil get this:
while ((Dir <> '') or (Drive <> '')) and (Canvas, Result) > MaxLen) do
begin
Which is different from the previous case! I don't understand this.
Thank you for helping.
Chris