[JW Lua] FCStaffStyleDefs:LoadAll() doesn't load all (with tiny update)
Jan Angermüller
jan at angermueller.com
Mon Jan 18 17:10:22 CET 2016
(still the same problem, but with an improved workaround code)
Hi Jari,
I noticed that FCStaffStyleDefs:LoadAll() doesn't load all staff styles
from time to time.
It works fine for example in the Finale default document, but in my
user-defined documents with about 30-40 staff styles it only loads about
10 to 15 elements (i.e. FCStaffStyleDefs.Count <= 15)
Maybe this is because some "default" staff styles were deleted (a "nil"
somewhere ?)
My current workaround is to use a standard loop, instead of a
LoadAll()/each-loop:
for i=1,100,1 do
local s=finale.FCStaffStyleDef()
s:Load(i)
local namestr=finale.FCString()
s:GetName(namestr)
if namestr.LuaString~="" then
print(i,namestr.LuaString)
-- ....do staff style processing...
end
end
Jan
More information about the JWLua
mailing list