[JW Lua] Some FCMiscDocPrefs.SymbolCommonTimeSig issues
Jan Angermüller
jan at angermueller.com
Mon Mar 2 12:14:46 CET 2015
Jari,
I have some questions about FCMiscDocPrefs.SymbolCommonTimSig and
SymbolCutTimeSig:
1.) If I change these values, nothing happens in the score, although the
value is stored correctly in docprefs when reloading. See script 1
below. The character values in "Document Options - Time Sigs" do not
change either.
2.) There also seems to be a range problem when selecting unicode
characters (character code>255) for SymbolCommonTimeSig:
when I put a unicode character into FCMiscDocPrefs.SymbolCommonTimSig
(for example 57721), it becomes a "signed 16bit"(or 32bit) instead of an
"unsigned 16bit"(or 32bit): 57721 becomes -7815.
See script 2 below. The value doesn't save in this case - probably
because JW Lua thinks it's out of range. If I select the unicode
character in the "Document options" manually, the unicode characters
work fine in Finale.
3.) Shouldn't SymbolCommonTimSig and SymbolCutTimeSig be placed in
FCMusicCharacterPrefs instead of FCMiscDocPrefs as they handle music
characters ?
Tested on 2014d/Windows 7/JW Lua v0.30.
Best regards,
Jan
Script 1:
local docprefs=finale.FCMiscDocPrefs()
docprefs:LoadFirst()
docprefs.SymbolCommonTimeSig=65
print(docprefs.SymbolCommonTimeSig)
docprefs:Save()
docprefs:LoadFirst()
print(docprefs.SymbolCommonTimeSig)--check if value was stored
correctly, and yes, it was, but not it was not updated in the Document
Options
Script 2:
local docprefs=finale.FCMiscDocPrefs()
docprefs:LoadFirst()
docprefs.SymbolCommonTimeSig=0xE179
print(docprefs.SymbolCommonTimeSig) --oops, returns -7815 instead of 57721
docprefs:Save()
docprefs:LoadFirst()
print(docprefs.SymbolCommonTimeSig) --check if value was stored
correctly, and no, it wasn't
More information about the JWLua
mailing list