[JW Lua] Error message without line number ... code snippet
Jari Williamsson
jari.williamsson at mailbox.swipnet.se
Sat Nov 29 16:59:35 CET 2014
Jan,
I'll write it up, although I can't promise I can fix it. It seems like
it's caused by the property wrapper in the package I use to connect to
Lua. I tried to look into the code, but the line of execution is not
that straight-forward and I don't have the time to step through it in
the debugger ATM.
This code would give the error line number, FWIW. I still promote the
use of properties, though... ;-)
---
local maxpoint=finale.FCPoint(1,1)
maxpoint:SetX(nil)
---
Best regards,
Jari Williamsson
On 2014-11-14 17:05, Jan Angermüller wrote:
> Jari,
>
> here is a short code snippet that produces a
> "bad argument" error without line number.
> Maybe it does have to do with the Lua implementation
> of the Finale PDK as it has to do with the FCPoint class:
> when assigning nil to a FCPoint.X the error message
> without line number comes up.
> The error message itself is ok ... but why without line number ?
> Makes debugging difficult.
>
> local maxpoint=finale.FCPoint(1,1)
> maxpoint.X=nil
>
> Running [Unnamed Script] ======>
> bad argument #2 to '?' (number expected, got nil)
> <======= [Unnamed Script] FAILED.
>
> Jan
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>
>
More information about the JWLua
mailing list