[JW Lua] FCStaffStyleDefs:LoadAll() doesn't load all

Jan Angermüller jan at angermueller.com
Mon Jan 18 17:01:53 CET 2016


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~="" then
             ....do staff style processing...
   end
end

Jan




More information about the JWLua mailing list