[JW Lua] Has functionality of FCPart changed?
Charles O. Lawrence
charlesolawrence at bellsouth.net
Sun Oct 20 02:52:29 CEST 2013
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/093b12e4/attachment-0002.html>
More information about the JWLua
mailing list