Page 1 of 1

var1 := Document.ReplaceAll does not work

Posted: 08 Jun 2011 17:55
by dustwalker
According to TextEd's Help, the document objects LineCount and ReplaceAll both generate integer outputs. I can assign LineCount's output to a variable, but not ReplaceAll's. Why?
For example:

Code: Select all

// Pascal script

// Global variables
var
var1, var2 : Integer;
// Enter code here
begin
  var1 := Document.LineCount;
  var2 := Document.ReplaceAll('a','a',False,False,False,False);
  ShowMessage(var1);
  ShowMessage(var2);
end.

Posted: 12 Jun 2011 10:44
by Rickard Johansson
Fixed. It's working in the next version (v7.43). Thanks!

Posted: 13 Jun 2011 16:47
by dustwalker
Thank you for your fast response. And congratulations for the best text editor I have ever seen.

Best regards

Re: var1 := Document.ReplaceAll does not work

Posted: 29 Jun 2011 01:15
by dustwalker
Hello again,
I have updated RJ TextEd to version 7.43, and I still have the same problem.

Regards

Re: var1 := Document.ReplaceAll does not work

Posted: 04 Jul 2011 15:05
by Rickard Johansson
I tried your script above and it seems to work properly. I get two dialogs which both display the same count value.

Re: var1 := Document.ReplaceAll does not work

Posted: 07 Jul 2011 19:36
by dustwalker
I downloaded the install file again. The command prompt program FC confirmed that this download and the previous one are identical. I Installed one of them in a clean "Windows XP Mode" virtual machine running under VMWare. I got the same behavior as in my main Windows 7 install. Document.ReplaceAll changes, for example, 122 strings, but var2 remains "0".

Best regards

Re: var1 := Document.ReplaceAll does not work

Posted: 08 Jul 2011 17:09
by Rickard Johansson
It's an option issue. Replace all doesn't always display the search result list when the "Silent" argument is false. It's been fixed.

I'll release a new beta in a day or so, please try it out to confirm it is working.

Re: var1 := Document.ReplaceAll does not work

Posted: 13 Jul 2011 06:30
by dustwalker
Version 7.50 is working.

Thank you and best regards