[JW Lua] Using the FCNoteEntryLayer class
Charles O. Lawrence
charlesolawrence at bellsouth.net
Thu Sep 12 22:47:19 CEST 2013
So far this "extremely simple" process has eluded me. I have spun my wheels
for hours on this and have not managed to do anything but make either both
layers disappear or put layer 1 into layer 2 (black notes turn red) for the
staff in the entire document. I can't seem to see the forest for the trees.
I guess I'm going to have to give in and ask for more help (grin). I'm sure
CreateCloneEntries comes into play, but not being able to figure out the why
and how of many of the methods has left me nowhere. The PDK docs are just a
little too sketchy in explaining why you want to use this or that method,
and my knowledge of the innards of Finale is very limited at this point.
In addition, I want this to work only for the selected region, but the
methods that have regions as arguments seem to all return FCNoteEntry
objects/collections. You indicated no other class was needed. Maybe it is
for regions, I'm not sure at this point.
I'm really getting a kick out of JWLua. Keep it coming. Thanks,
Charles Lawrence
-----Original Message-----
From: JWLua [mailto:jwlua-bounces at jwmusic.nu] On Behalf Of Jari Williamsson
Sent: Wednesday, September 11, 2013 4:55 PM
To: The JW Lua script plug-in.
Subject: Re: [JW Lua] Using the FCNoteEntryLayer class
The process to swap 2 layers is extremely simple in this case. You don't
need to use any iterators, and you don't need to access any other class than
FCNoteEntryLayer to do it. I think the only thing to keep in mind is that
for this class, the layer number is 0-based, called a "LayerNumberIndex".
The "storage buffer" you mention is actually the FCNoteEntryLayer class.
Best regards,
Jari Williamsson
On 2013-09-11 22:43, Charles O. Lawrence wrote:
> My goal in using this class is to swap the contents of two layers.
> The class browser does not show any sample code for FCNoteEntryLayer.
> Is there an iterator? I want to work out the details for myself for
> learning purposes, so don't supply any code, but a few words on what
> you have to do to get started on this project would be helpful.
> Conceptually, the task is simple enough. One way would be to copy or
> clone layer "a" into a storage buffer of some kind, then move layer "b"
> into layer "a", then move the buffer into layer "a". I don't know if
> this idea is doable using the methods and properties of this class
> alone. So far I am batting zero. If I still don't get anywhere
> implementing any suggestions you may provide, I'll come back and ask
> for more detail.
>
> Thanks,
>
> Charles
>
>
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>
_______________________________________________
JWLua mailing list
JWLua at jwmusic.nu
http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
More information about the JWLua
mailing list