[JW Lua] Page/Part questions

Charles O. Lawrence charlesolawrence at bellsouth.net
Mon Sep 23 15:15:50 CEST 2013


Should not the constant PARTID_SCORE be finale.PARTID_SCORE in JWLua
(namespace context required)?   It would be nice if the script you provided
for showing constants printed the name and value of the constant.  Why are
PARTID_CURRENT and PARTID_UNKNOWN both equal to -1?  When would you use an
unknown part?

Sometimes you need to generate parts to make sure you have all of them and
that they are up-to-date.  Is there a way to do this in JWLua?

Thanks,
Charles Lawrence




-----Original Message-----
From: JWLua [mailto:jwlua-bounces at jwmusic.nu] On Behalf Of Jari Williamsson
Sent: Monday, September 23, 2013 8:15 AM
To: The JW Lua script plug-in.
Subject: Re: [JW Lua] Page/Part questions

On 2013-09-23 01:10, Charles O. Lawrence wrote:
> You said " SetCurrent() is used to re-program a part object to the 
> part currently in focus."  Could you elaborate?  Sorry, I still don't get
it.

It's perhaps not a method you'd use that often, but I've implemented it in
the C++ framework since I needed it at some point.

Here's an example:
---
function processapart(part)
     part:SwitchTo
     -- Do same editing of the part
     part:SwitchBack()
end

local thepart = finale.FCPart(PARTID_SCORE)
-- Process the score:
processapart(thepart)
thepart:SetCurrent()
-- Process the part (or score) that is currently in the focus:
processapart(thepart)

---

On a related note, I just discovered that the JW Lua hook to the FCPart
constructor is slightly wrong. In JW Lua, it should always require one
parameter constant. Although this is a quite harmless bug, it will be fixed
in 0.07.


Best regards,

Jari Williamsson




_______________________________________________
JWLua mailing list
JWLua at jwmusic.nu
http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu





More information about the JWLua mailing list