[JW Lua] More class questions

Charles O. Lawrence charlesolawrence at bellsouth.net
Thu Aug 29 21:32:16 CEST 2013


Jari,

 

Below is my modified script to test classes.

 

What is it about FCUI that doesn't work?

 

You said "note" classes can be accessed through an iterator, like in the
below test script, or through a collection.  Please show an example of how
to access a "note" class property, say "Staff", through a collection.  If an
FCNoteEntry is a collection of FCNote objects, how can you access the
properties/methods of one of those objects?

 

If a property is non-existent, i.e. misspelled, like in e.Visable, no error
is generated.  Is this a consequence of the loose typing inherent in Lua?

 

BTW, in the development window, if you select a line and want to drag and
drop it somewhere that is not visible at the moment, the window will not
scroll up/or down past the visible limits if you drag beyond the top/bottom
of the window.

 

Thanks,

Charles

 

------------------------------------

 

function plugindef()

   -- This function and the 'finaleplugin' namespace

   -- are both reserved for the plug-in definition.

   finaleplugin.RequireSelection = true

   finaleplugin.Author = "Charles O. Lawrence"

   finaleplugin.Version = "0.2"

   finaleplugin.CategoryTags = "Test"

   return "Test Classes", "Test Classes", "Test JWLua classes"

end

a = finale.FCArticulation()

a = finale.FCArticulationDef()

a = finale.FCArticulationDefs()

b = finale.FCBeatChartElement()

b = finale.FCBeatChartElements()

c = finale.FCCategoryDef()

c = finale.FCCategoryDefs()

c = finale.FCCell(0,0)

c = finale.FCCells()

c = finale.FCCurrentStaffSpec()

c = finale.FCCustomStemMod()

e = finale.FCEntryAlterMod()

e = finale.FCExpression()

e = finale.FCExpressions()

g = finale.FCGroup()

g = finale.FCGroups()

m = finale.FCMeasure()

m = finale.FCMeasures()

m = finale.FCMultiMeasureRest()

m = finale.FCMultiMeasureRestPrefs()

m = finale.FCMultiMeasureRests()

m = finale.FCMultiStaffInstrument()

m = finale.FCMultiStaffInstruments()

m = finale.FCMusicRegion()

n = finale.FCNoteheadMod()

p = finale.FCPage()

p = finale.FCPages()

p = finale.FCPart()

p = finale.FCParts()

p = finale.FCPerformanceMod()

s = finale.FCShapeExpressionDef()

s = finale.FCStaff()

s = finale.FCStaffSystem()

s = finale.FCStaffSystems()

s = finale.FCStaves()

s = finale.FCString(nil)

s = finale.FCSystemStaff()

s = finale.FCSystemStaves()

t = finale.FCTempoElement()

t = finale.FCTempoElements()

t = finale.FCTextExpressionDef()

--u = finale.FCUI()

 

for e in eachentry(finenv.Region()) do

    a = finale.FCArticulations(e)

    --access an FCNote() property

        n = e.NoteID

    --access an FCNoteEntry() property

        v = e.Visible

    --access an FCNoteEntryCell() property

        s = e.Staff

    n = finale.FCNoteheadMods(e)

    p = finale.FCPerformanceMods(e)

end

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20130829/77396342/attachment.htm>


More information about the JWLua mailing list