[JW Lua] Repeat Brackets Hide Mysteriously - still unsolved

Robert Patterson robert at robertgpatterson.com
Thu Oct 20 15:38:06 CEST 2022


I've just done more complete analysis, and I think I know what's going on.
If you would like to send me a test script and file, and can confirm that
0.65 fixes it.

The Visible property has been added to all repeat bracket types in 0.65, so
you will be able better to manage visibility.

Just so you are aware, the FCSeparatePlacement.Measure property is only
valid for mode SEPARMODE_TEXTREPEAT. The PDK Framework (before 0.65) was
not taking this into account, and that is at the root of this bug. If your
code expects it to work with any other separate placement mode, you will
probably need to revisit the code.


On Thu, Oct 20, 2022 at 7:18 AM Robert Patterson <
robert at robertgpatterson.com> wrote:

> I did an overhaul of hide/show repeat brackets for 0.65. Each
> FCSeparatePlacement has its own hide/show bit that overrides the hide/show
> in the main repeat bracket.
>
> Possibly that will fix this issue.
>
>
> On Thu, Oct 20, 2022 at 4:30 AM Jan Angermüller <jan at angermueller.com>
> wrote:
>
>> Robert,
>>
>> do you have any ideas on this old issue?
>> It popped up again in another document.
>> Is the "Show/Hide" property somehow available for FCEndingRepeat?
>>
>> Jan
>>
>> On 03.07.2019 / 12:31 Jan Angermüller wrote:
>>
>> I have found out that when you copy (Save as...) the repeat bracket to a
>> new measure, the new repeat bracket will behave correctly and not hide when
>> calling sep:AssureStaffPlacement(1) .
>> So there seems be some measure cell flag that says that the repeat
>> bracket should hide. But I can't access it.
>> When I now delete the old repeat bracket in measure 5 and run the script
>> again to copy back from measure 6 to measure 5, the new repeat bracket will
>> again behave false and hide. So the "Hide" flag is not reset by deleting
>> the repeat bracket, but still seems to be active in the background.
>>
>> The result:
>> - the first repeat bracket is again hidden
>> - but the copied repeat bracket is fine
>>
>>
>> Here is the new test code (applied to the document from the email
>> 2/7/2019):
>>
>> local endrep=finale.FCEndingRepeat()
>> if endrep:Load(5) then   --i.e. load bracket in measure 5
>>     endrep.IndividualPositioning=true --not really required here as it is
>> already true in the document, just for better understanding
>>     local sep=endrep:CreateSeparatePlacements()
>>     local s=sep:AssureStaffPlacement(1)    -- i.e. create separate
>> placement element for staff 1 -> this leads to the hiding
>>
>>     --Now save to measure 6 and see what happens
>>     endrep:SaveAs(6)
>>     local meas=finale.FCMeasure()
>>     meas:Load(6)
>>     meas.RepeatBracketFlag=true --make the new repeat bracket active
>>     meas:Save()
>>     local sep=endrep:CreateSeparatePlacements()
>>     local s=sep:AssureStaffPlacement(1) --DOES NOT hide the second repeat
>> bracket
>>
>>     --try again with loading
>>     local endrep=finale.FCEndingRepeat()
>>     if endrep:Load(6) then
>>         endrep.IndividualPositioning=true
>>         local sep=endrep:CreateSeparatePlacements()
>>         local s=sep:AssureStaffPlacement(1)   --DOES NOT hide the second
>> repeat bracket
>>     end
>> end
>>
>> Anyone any ideas?
>>
>> Jan
>>
>>
>> -------- Weitergeleitete Nachricht --------
>> Betreff: [JW Lua] Repeat Brackets Hide Mysteriously
>> Datum: Tue, 2 Jul 2019 13:08:50 +0200
>> Von: Jan Angermüller <jan at angermueller.com> <jan at angermueller.com>
>> Antwort an: The JW Lua script plug-in. <jwlua at jwmusic.nu>
>> <jwlua at jwmusic.nu>
>>
>>
>>
>>
>> Jari et al,
>>
>> I have a problem with an ending repeat bracket. Attached is an excerpt
>> from an orchestra score.
>> When I want to add a "separate placement" (i.e. a change of the bracket
>> offsets only for this staff), the repeat bracket always hides. The
>> following code is the excerpt which leads to the hiding in the attached
>> document:
>>
>> local endrep=finale.FCEndingRepeat()
>> if endrep:Load(5) then   --i.e. load bracket in measure 5
>>     endrep.IndividualPositioning=true --not really required here as it is
>> already true in the document, just for better understanding
>>     local sep=endrep:CreateSeparatePlacements()
>>     local s=sep:AssureStaffPlacement(1)    -- i.e. create separate
>> placement element for staff 1 -> this leads to the hiding
>>     --... here follows the part which sets the offsets, but it's not
>> required for this problem, the staff becomes hidden
>> end
>>
>> Can anyone explain this?
>> Or in other words: each bracket in Finale has a show/hide property. How
>> can I address show/hide of brackets in JW Lua?
>> FCSeparatePlacement only has offset values, but no visibility properties.
>> Same for FCEndingRepeat.
>> (Of course, you can also handle this over staff lists, but I assume they
>> don't have anything to do with show/hide property)
>>
>> Jan
>> _______________________________________________
>> JWLua mailing list
>> JWLua at jwmusic.nu
>> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20221020/22d302ed/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 6e0GhmXnHUBsIZ5M.png
Type: image/png
Size: 4312 bytes
Desc: not available
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20221020/22d302ed/attachment-0001.png>


More information about the JWLua mailing list