[JW Lua] expression delete

lists.jc.michel at symetrie.com lists.jc.michel at symetrie.com
Fri Jul 4 11:02:48 CEST 2014


Hi,


I have concerns with expression deleting with Lua.
I succeeded in listing all used expressions in a score (browsing Measures);
but strange things appears when I delete unused FCTextEpressionDefs : in Finale the rectangle in expression browser is still there, while empty.

Another thing is this one: FCTextExpressionDefs seems to react strangely when deleting one expression def.
Here is an example:

local teds = finale.FCTextExpressionDefs()
teds:LoadAll()
print(teds.Count, "text expressions")

local ted = finale.FCTextExpressionDef()
ted:Load(4) — replace 4 with the ID of a text expression defined in your file but not used
print(ted:DeleteData())

teds:LoadAll()
print(teds.Count, "text expressions")

Here is the output for me:

416 text expressions
true
3 text expressions

Why deleting a text expression def (not used anywhere in the doc) produces such a mess ?
Is it a bug of Lua interface ?



More information about the JWLua mailing list