[JW Lua] FCNoteEntry:IsPartOfTuplet/IsStartOfTuplet hangs

Jari Williamsson jari.williamsson at mailbox.swipnet.se
Thu Jan 23 23:27:21 CET 2014


Jan,

I misspoke. The bug is in the layer between Lua and C++, since the 
methods use a default parameter - and that default parameter is also 
incompatible with JW Lua. For now, put nil as a parameter for both 
methods, that'll solve the issue for now. Such as:

local region = finale.FCMusicRegion()
region:SetCurrentSelection()
for e in eachentry(region) do
     print("IsDotted:", e:IsDotted())
     print("IsStartOfTuplet:", e:IsStartOfTuplet(nil))
     print("IsPartOfTuplet:", e:IsPartOfTuplet(nil))
end

I'll change the syntax for these methods to more JW Lua-safe versions in 
the next beta.


Best regards,

Jari Williamsson



On 2014-01-23 13:05, Jan Angermüller wrote:
> Hi Jari,
>
> FCNoteEntry:IsPartOfTuplet and FCNoteEntry:IsStartOfTuplet
> seem to lead to an infinite loop. This is the code:
>
> local region = finale.FCMusicRegion()
> region:SetCurrentSelection()
> for e in eachentrysaved(region) do
>      print("IsDotted:", e:IsDotted())
>      print("IsStartOfTuplet:", e:IsStartOfTuplet())
>      print("IsPartOfTuplet:", e:IsPartOfTuplet())
> end
>
> It displays "IsDotted: false" (or true if it's dotted),
> and then it hangs (version 0.15).
>
> And as a "very low priority nice-to-have" feature:
> infinite loops can't be interrupted - like probably in this case,
> but I also produced some of my own...  Finale hangs and needs
> to be restarted in these cases. Would be great to have
> the possibility to interrupt the plugin in these cases ("Press Esc to
> cancel").
>
> Best,
> Jan
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>






More information about the JWLua mailing list