DO 12.2.3
Hello.. I just noticed that the custom fields in a rename dialog isn't accessible
for reading before the script has been saved and you doubleclick it, or you
click refresh preview twice.
To reproduce:
- Open the rename dialog (do not doubleclick a preset)
- Click Edit (script)
- Replace the contents of the script window with this JScript code:
[code]function OnGetCustomFields(getCustomFieldData){
getCustomFieldData.fields.test='Hello';
}
function OnGetNewName(getNewNameData){
return getNewNameData.custom.test+getNewNameData.newname;
}
[/code]
- Click Refresh Preview
The first time you click Refresh Preview, custom.test will be undefined.
When you repeat it, it will use the specified default. If the variabletype
is a vector the script will crash with a subscript out of range the first time.
After you've refreshed once you'll have to close the rename dialog and
reopen it to make it happen again.
Unless you already had an open script (by doubleclicking a preset before pasting the code) any
changes to the field(s) seems to be ignored on the following refreshes.