[JW Lua] Has functionality of FCPart changed?
Charles O. Lawrence
charlesolawrence at bellsouth.net
Sun Oct 20 03:34:57 CEST 2013
Jari et al,
I think I see that now FCPart() requires an argument of the part number, and
that the old method Load() is no longer valid. The class browser example
code needs to be updated.
I have attached the latest of my script SetPageSize for your critique. It
has two dropdowns, one for the page size, and anoter for which parts are to
be changed.
Charles
From: JWLua [mailto:jwlua-bounces at jwmusic.nu] On Behalf Of Charles O.
Lawrence
Sent: Saturday, October 19, 2013 8:52 PM
To: JWLua at jwmusic.nu
Subject: [JW Lua] Has functionality of FCPart changed?
Jari et al,
I am trying to loop through a range of parts. I cannot get the following
concept to work. According to the class browser examples, this should be
OK. Has something radically different been implemented in the latest Beta?
I have beat my brains out trying to get this to work and get all sorts of
weird errors like "bad argument #2 to 'FCPart' (number expected, got no
value)". Does FCPart() now require an argument, and if so what is it
supposed to be?
-- loop through the parts
local part = finale.FCPart()
for p = loopStart,loopEnd do
part:Load(p)
part:SwitchTo()
--do something to the part here
part:SwitchBack()
end
If I put the local part = finale.FCPart(p) inside the loop, then I get this
error, "attempt to call method 'Load' (a nil value)". p is definitely not
nil.
-- loop through the parts
for p = loopStart,loopEnd do
local part = finale.FCPart(p)
part:Load()
-- same error with this part:Load(p)
part:SwitchTo()
--do something to the part here
part:SwitchBack()
end
So what is going on here?!?!
Charles Lawrence
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20131019/5e00ecb7/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SetPageSize1.lua
Type: application/octet-stream
Size: 6939 bytes
Desc: not available
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20131019/5e00ecb7/attachment.obj>
More information about the JWLua
mailing list