[JW Lua] InsertEntriesAfter crashes Finale

Jan Angermüller jan at angermueller.com
Mon Jul 2 16:55:32 CEST 2018


Jari,

the document under the following link crashes when I call 
InsertEntriesAfter (tested on Windows 10/Finale 2014):
https://elbsound.studio/img/sl4.musx

Code snippet:
local region=finale.FCMusicRegion()
region:SetFullDocument()
noteentrylayerdest=finale.FCNoteEntryLayer(2,region.StartStaff,1,1) 
--insert on layer 3 first staff measure 1
if noteentrylayerdest:Load()
     and (noteentrylayerdest.Count==0) then --only insert if frame is empty
     local newentry=noteentrylayerdest:InsertEntriesAfter(nil,1)
end

I assume that there is something corrupt with the document - as can be 
seen by the 500 KB file size (although I haven't noticed any other weird 
behaviours with this document). But: it would be great if Finale didn't 
crash in this case, but JW Lua would return a nil value, if it noticed 
any problems.
If you run the same script on Finale's default document, it works fine 
(though it doesn't do anything yet as the new frame isn't saved in the 
code snippet).

Best regards,
Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20180702/d1872980/attachment.html>


More information about the JWLua mailing list