[JW Lua] Using JWLua

Charles O. Lawrence charlesolawrence at bellsouth.net
Tue Aug 27 19:58:12 CEST 2013


Jari,

I take it that the "entry" in the name of the iterator implies you are
referencing an FCNote"Entry" class object.  If this is the case, it was not
evident to me at least.  Thanks for clearing it up.
What does TGF stand for?

Charles Lawrence

-----Original Message-----
From: JWLua [mailto:jwlua-bounces at jwmusic.nu] On Behalf Of Jari Williamsson
Sent: Tuesday, August 27, 2013 12:31 PM
To: The JW Lua script plug-in.
Subject: Re: [JW Lua] Using JWLua

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


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





More information about the JWLua mailing list