#1 2007-05-22 01:37

Fathom
Member
From: Boulder, CO USA
Registered: 2007-05-10
Posts: 29

Fix for "Serialize Duplicates" sample script included with ReNamer

Currently fails to compile with "Unknown identifier" errors on lines 6, 7, and 14.

replace:  WideArraySetLength()
     with:  SetLength()

replace:  WideArrayLength()
     with:  Length()

Not sure if that fixes it, but it no longer gets errors.
Combination of "monkeys with keyboards" approach and something I saw somewhere in forums.

Fathom

Offline

#2 2007-05-22 07:53

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,374

Re: Fix for "Serialize Duplicates" sample script included with ReNamer

From change log for ReNamer 4.50:

* Updated PascalScript source to the latest January SVN release,
  which has finally addressed previously reported by me issues, now:
  1) SetLength() and Length() functions work for both WideStrings and Arrays;
  2) Widestring indexed character access is working, i.e. WideString[1];
  Note: WideArrayLength() and WideArraySetLength() functions are removed!

I've updated the scripts straight away, and here is the sample line from that script which is bundled with the latest version of ReNamer: SetLength(Files, Length(Files)+1); It no longer uses WideArraySetLength() and WideArrayLength() functions. Perhaps, you've combined scripts from some older version with the latest executable, and that's why you get that problem.

Anyway, your suggested fix is correct, and that is exactly what I did when I modified them. smile

Offline

#3 2007-05-22 08:08

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,374

Re: Fix for "Serialize Duplicates" sample script included with ReNamer

I just checked the Installer script, and I've found the cause for your problem.

For scripts, translits and help files which come together with ReNamer: the onlyifdoesntexist flag was set - which means that these files would be installed only if they don't exist already in your destination folder. I thought that users might change them, so I wouldn't want to overwrite their changes, but now I have reconsidered this issue - decided to remove that flag.

From now on, default scripts, translits and help files which come together with ReNamer will be overwritten.

Updated Installer: ReNamer.exe

Offline

#4 2007-05-22 08:33

Fathom
Member
From: Boulder, CO USA
Registered: 2007-05-10
Posts: 29

Re: Fix for "Serialize Duplicates" sample script included with ReNamer

Your original thinking was very good. 

I learned long ago never to keep working files, config's, ini's, dat's, etc. that I want to preserve in "Program Files".  I keep a "My Program Files" folder in "My Documents" containing program related work product.  The "ReNamer" folder there is getting thick.  Thanks for your updated installer.

Thanks,
Fathom

Offline

#5 2007-05-22 17:25

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,374

Re: Fix for "Serialize Duplicates" sample script included with ReNamer

Are you saying that I should come back to the origianl way?

(when installer did not overwrite the existing files)

Offline

Board footer

Powered by FluxBB