[JW Lua] More class questions

Charles O. Lawrence charlesolawrence at bellsouth.net
Fri Aug 30 16:08:33 CEST 2013


I have enjoyed refreshing my object oriented programming skills by using
JWLua.  I had never used Lua before, but it's just another scripting
language, albeit object oriented.  I've used several others in my
professional career including DCL (DEC Command Language), Windows Scripting,
JavaScript, Perl, Python, etc.  I used several compilers including FORTRAN
77, BASIC, PASCAL, ADA, C, C++, and have tinkered with C# after retiring
from professional programming.  So I do have some programming skills, though
it has been 10 years now since I retired, so I'm a little rusty.

It's funny how you say you are going to "hide" some of the details from the
scripter, like needing to instantiate an object, and use "Create" methods to
hide the details behind the scene.  This is a good idea.  I was thinking to
myself just yesterday that I needed to mention to you that, in my opinion,
even though I thrive on "stuff" like this, the "average" Finale user who
wants to script something for himself would be overwhelmed by the details
and probably quickly give up.  I still am having some difficulty finding the
right property or method to do even simple things, like vertically
positioning a rest, for instance that I mentioned before.  Figuring out what
to do and how this TGF frame thing works is certainly not intuitive.  After
you see the picture, things begin to make more sense, but it is slow going.
This is beyond the scope of the current objectives, I'm sure, but to have
the editor present to the scripter on the fly a list of valid syntax
constructs in the current context, similar to what say Visual Studio does,
would be wonderful.  Am I dreaming?!

Keep up the good work.  This project is very interesting to me.  I wonder
how others are getting along.  There has not been any traffic on the
mailinglist except between us, that I have seen.  Only one other member,
Carl Vine has posted anything.

Charles Lawrence


-----Original Message-----
From: JWLua [mailto:jwlua-bounces at jwmusic.nu] On Behalf Of Jari Williamsson
Sent: Friday, August 30, 2013 4:17 AM
To: The JW Lua script plug-in.
Subject: Re: [JW Lua] More class questions

On 2013-08-29 23:26, Charles O. Lawrence wrote:
> Thanks for taking the time and having the patience to answer what must 
> seem like novice questions.

No problem at all. Questions like these are important to me to improve the
syntax and consistency of the scripting language.

For example, I've now realized that it isn't productive for a script
programmer to constantly need to remember how to construct an object,
specially when the object is related to some other object. The only
important task for a script is to manipulate things (=objects).

So I'll use more extensive use of what I call the "Create" methods in the
framework (and JW Lua) in the future. (A "Create" method only creates
objects, it creates nothing in the Finale database.) For scripting, it makes
much more sense to write (where "e" is assumed to be a FCNoteEntry):

---
-- Gets all articulations attached to an entry
theartics = e:CreateArticulations()
---

compared to the current (beta 0.03) approach:
---
theartics = finale.FCArticulations(e)
theartics:LoadAll()
---

Thanks for your testing!


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