[JW Lua] Using JWLua
Jari Williamsson
jari.williamsson at mailbox.swipnet.se
Tue Aug 27 18:31:02 CEST 2013
On 2013-08-27 18:10, Charles O. Lawrence wrote:
> Perhaps a sample script showing what the FCNoteEntry class is used for
> would shed some light.
You ARE using the FCNoteEntry class if you use the "eachentry" or
"eachentrysaved" iterators: the object instances are fed directly to the
loop (the "e" in the eachentrysaved example is a FCNoteEntry class object).
Here's an example:
---
for e in eachentrysaved(finenv.Region()) do
-- 'e' is now a FCNoteEntry. Here you can use any FCNoteEntry
-- properties or methods for 'e', such as:
print ("Stem is up:", e:CalcStemUp())
print ("Is rest:", e:IsRest())
e.GraceNote = true
end
---
The difference with note entries in Finale (compared to most other data)
is that they can't be saved as their own object, they must reside within
a TGF (an entry frame). So in JW Lua, you never construct FCNoteEntry
objects directly through a constructor, only load them indirectly
(through an iterator, such as eachentry(), or an entry collection class,
such as FCNoteEntryCell).
Best regards,
Jari Williamsson
More information about the JWLua
mailing list