[JW Lua] More questions

Jari Williamsson jari.williamsson at mailbox.swipnet.se
Thu Aug 29 18:56:50 CEST 2013


On 2013-08-29 18:03, Charles O. Lawrence wrote:

> The ones that will not work have been commented out.  Why do they not work?

The "note" classes can't be instantiated directly in JW Lua, since they 
are subparts of TGFs. You need to access them from an iterator or a 
collection.

It's an error by me to have these constructs syntax highlighted as 
valid. I'll write it up as a bug.

Btw, FCNoteEntry is a collection of it's own - it's a collection FCNote 
instances. There might be zero FCNote objects in FCNoteEntry if it's a 
standard rest.

FCCell requires 2 arguments on construction: 1-based measure number and 
staff number id.

The collections that hook to an entry (such as "FCArticulations", and 
all the classes ending with "Mods") requires an entry object as the 
parameter.

That should cover it, I think.

> FCString required an argument, even though it could be nil.  The PDK
> seemed to indicate no argument would produce a nil string.  There are no
> methods or properties available to FCString in the class browser.  It
> does not seem to be possible to do anything with the string like print
> it out or determine its length.

The FCString class is hooked up but its methods aren't yet implemented, 
so the FCString class isn't very useful right now. And the FCString 
constructor in JW Lua might change in 0.04. Since Lua is loosely typed, 
I need to find a good approach to replace the overloaded methods that I 
currently have implemented in the C++ version of the framework.

> I want to simply set the vertical position of a rest in a measure.  I
> cannot find a property that will set vertical position.  It must be
> there.  What is it?

Rests isn't very logical in Finale. A non-movable standard rest is a 
FCNoteEntry with no "notes". A movable rest is a "one-note chord" where 
the note entry has the "rest flag" set, so you have to look in the 
FCNote info to move the rest. The "Edit Frame" dialog in Finale provides 
some info on how things are related.

If you got an entry which is a rest (or that should be a rest), first 
use the entry's MakeMovableRest() method on the entry to assure that 
it's movable (and that it contains exactly one FCNote object). After 
that, get the movable rest "note" by using "myrestnote = 
myentry:GetItemAt(0)". That "note" that you got can now be vertically 
moved with the "Displacement" property.


Best regards,

Jari Williamsson





More information about the JWLua mailing list