[JW Lua] Removal of FCSeparatePlacements.SetMode

Robert Patterson robert at robertgpatterson.com
Fri Sep 2 13:08:37 CEST 2022


I had second thoughts about removing it. For it to be truly correct,
SetMode should be removed from FCSeparatePlacement as well and both should
have their constructors removed. This seems like a bigger risk than I want
to take.

What I *will* do is add the SEPARMODE_ constants. That's because I am also
adding FCSeparatePlacement.GetMode. It turns out that the H2 and V2 fields
have different meanings depending on which mode the class is running. V2
functions as a flag field for one of them. (!) Once I have all the
information in place, I'll add it to the documentation along with any
missing fields.

On Fri, Sep 2, 2022 at 3:25 AM Jan Angermüller <jan at angermueller.com> wrote:

> Robert,
>
> I have found one line in Perfect Layout where SetMode is used.
> But it looks like it was just used because of the documentation of SetMode.
> It doesn't change the actual mode. It only confirms the original mode.
>
> As :GetMode or .Mode doesn't exist, I can't check if it is necessary.
> But if you say it's not, I can omit the SetMode line.
>
> It's something like this (haven't checked this excerpt, it's part of large
> code block)
> local endrepeat=finale.FCEndingRepeat()
> if endrepeat:Load(1) then
>   if endrepeat.IndividualPositioning then
>     local
> sep=endrepeat:CreateSeparatePlacements()
>     sep:SetMode(2)  --==finale.SEPARMODE_ENDINGREPEAT which doesn't exist
>     local s=sep:AssureStaffPlacement(startstaff)
>     s.HorizontalOffset2=0
>     s:Save()
>   end
> end
>
> Jan
>
> Am 01.09.2022 um 20:51 schrieb Robert Patterson:
>
> I am intending to remove Lua access to FCSeparatePlacements.SetMode,
> unless someone can convince me otherwise. This mode is set by the relevant
> ...Ending:CreateSeparatePlacements function and it should never be changed.
>
> I am not certain why it was added to JW Lua.
>
>
> _______________________________________________
> JWLua mailing listJWLua at jwmusic.nuhttp://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>
>
> _______________________________________________
> 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/20220902/3995ffbe/attachment.htm>


More information about the JWLua mailing list