[JW Lua] Cmper/Inci explanation (was: Deleting Page Text)
Jan Angermüller
jan at angermueller.com
Wed Dec 9 09:49:33 CET 2020
> “Returns the inci (subrecord) value in the data ID for a loaded record.
> “The inci value is the 0-based record within the cmper.”
> Can you explain? (This could save me a lot of time and reduce the
number of questions I ask here….).
The Load-function in this case simple refers to a two-dimensional array:
array[Cmper][Inci]
This is used in many classes (e.g. Expressions) or similar in
articulations (array[NoteEntryNumber][Inci]).
Cmper is usually the measure number, the page number or whatever makes
sense in the context. Sometimes you need to try what Cmper refers to.
It's not always that clear in the documentation. But if you think about
what makes sense, you will find out.
Inci starts with 0 and each item has an increasing number.
Note: I am not sure, but if IIRC it's also possible that there are leaps
in the inci numbering (i.e. Inci 0, Inci 1, Inci 3) if items were
deleted or if the document is corrupt, especially on expressions.
IIRC pagetexts use the array[PageNumber][Inci], so loading means:
PageText:Load(PageNumber,ItemNumberOnThatPage)
Best,
Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20201209/a0623704/attachment.html>
More information about the JWLua
mailing list