[JW Lua] More questions
Charles O. Lawrence
charlesolawrence at bellsouth.net
Thu Aug 29 19:14:52 CEST 2013
Thanks for the info. That's a lot to digest and get a handle on. WOW! I
had no idea you had to jump through so many hoops to set the vertical
position of a rest.
I'm sure I'll have more questions,
Charles Lawrence
-----Original Message-----
From: JWLua [mailto:jwlua-bounces at jwmusic.nu] On Behalf Of Jari Williamsson
Sent: Thursday, August 29, 2013 12:57 PM
To: The JW Lua script plug-in.
Subject: Re: [JW Lua] More questions
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
_______________________________________________
JWLua mailing list
JWLua at jwmusic.nu
http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
More information about the JWLua
mailing list