Skip to content

Commit 7b79df9

Browse files
chore: autopublish 2024-01-17T16:01:49Z
1 parent f373d87 commit 7b79df9

File tree

69 files changed

+1082
-343
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1082
-343
lines changed

dist/barline_chooser.lua

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1808,18 +1808,27 @@ package.preload["mixin.FCMCustomWindow"] = package.preload["mixin.FCMCustomWindo
18081808
local methods = class.Methods
18091809
local private = setmetatable({}, {__mode = "k"})
18101810
local function create_control(self, func, num_args, ...)
1811-
local control = self["Create" .. func .. "__"](self, ...)
1812-
private[self].Controls[control:GetControlID()] = control
1813-
control:RegisterParent(self)
1811+
local result = self["Create" .. func .. "__"](self, ...)
1812+
local function add_control(control)
1813+
private[self].Controls[control:GetControlID()] = control
1814+
control:RegisterParent(self)
1815+
end
1816+
if func == "RadioButtonGroup" then
1817+
for control in each(result) do
1818+
add_control(control)
1819+
end
1820+
else
1821+
add_control(result)
1822+
end
18141823
local control_name = select(num_args + 1, ...)
18151824
if control_name then
18161825
control_name = type(control_name) == "userdata" and control_name.LuaString or control_name
18171826
if private[self].NamedControls[control_name] then
18181827
error("A control is already registered with the name '" .. control_name .. "'", 2)
18191828
end
1820-
private[self].NamedControls[control_name] = control
1829+
private[self].NamedControls[control_name] = result
18211830
end
1822-
return control
1831+
return result
18231832
end
18241833

18251834
function class:Init()
@@ -1853,12 +1862,24 @@ package.preload["mixin.FCMCustomWindow"] = package.preload["mixin.FCMCustomWindo
18531862
for num_args, ctrl_types in pairs({
18541863
[0] = {"CancelButton", "OkButton",},
18551864
[2] = {"Button", "Checkbox", "CloseButton", "DataList", "Edit", "TextEditor",
1856-
"ListBox", "Popup", "Slider", "Static", "Switcher", "Tree", "UpDown",
1865+
"ListBox", "Popup", "Slider", "Static", "Switcher", "Tree", "UpDown", "ComboBox",
18571866
},
1858-
[3] = {"HorizontalLine", "VerticalLine",},
1867+
[3] = {"HorizontalLine", "VerticalLine", "RadioButtonGroup"},
18591868
}) do
18601869
for _, control_type in pairs(ctrl_types) do
1861-
if not finale.FCCustomWindow.__class["Create" .. control_type] then
1870+
local type_exists = false
1871+
if finenv.IsRGPLua then
1872+
type_exists = finale.FCCustomWindow.__class["Create" .. control_type]
1873+
else
1874+
1875+
for k, _ in pairs(finale.FCCustomWindow.__class) do
1876+
if tostring(k) == "Create" .. control_type then
1877+
type_exists = true
1878+
break
1879+
end
1880+
end
1881+
end
1882+
if not type_exists then
18621883
goto continue
18631884
end
18641885
methods["Create" .. control_type] = function(self, ...)
@@ -2843,7 +2864,7 @@ package.preload["mixin.FCXCtrlUpDown"] = package.preload["mixin.FCXCtrlUpDown"]
28432864

28442865
if private[self].AlignWhenMoving then
28452866

2846-
local num_steps = tonumber(tostring(value / step_def.value))
2867+
local num_steps = tonumber(tostring(value / step_def.value)) or 0
28472868
if num_steps ~= math.floor(num_steps) then
28482869
if delta > 0 then
28492870
value = math.ceil(num_steps) * step_def.value

dist/cross_staff_offset.lua

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1902,18 +1902,27 @@ package.preload["mixin.FCMCustomWindow"] = package.preload["mixin.FCMCustomWindo
19021902
local methods = class.Methods
19031903
local private = setmetatable({}, {__mode = "k"})
19041904
local function create_control(self, func, num_args, ...)
1905-
local control = self["Create" .. func .. "__"](self, ...)
1906-
private[self].Controls[control:GetControlID()] = control
1907-
control:RegisterParent(self)
1905+
local result = self["Create" .. func .. "__"](self, ...)
1906+
local function add_control(control)
1907+
private[self].Controls[control:GetControlID()] = control
1908+
control:RegisterParent(self)
1909+
end
1910+
if func == "RadioButtonGroup" then
1911+
for control in each(result) do
1912+
add_control(control)
1913+
end
1914+
else
1915+
add_control(result)
1916+
end
19081917
local control_name = select(num_args + 1, ...)
19091918
if control_name then
19101919
control_name = type(control_name) == "userdata" and control_name.LuaString or control_name
19111920
if private[self].NamedControls[control_name] then
19121921
error("A control is already registered with the name '" .. control_name .. "'", 2)
19131922
end
1914-
private[self].NamedControls[control_name] = control
1923+
private[self].NamedControls[control_name] = result
19151924
end
1916-
return control
1925+
return result
19171926
end
19181927

19191928
function class:Init()
@@ -1947,12 +1956,24 @@ package.preload["mixin.FCMCustomWindow"] = package.preload["mixin.FCMCustomWindo
19471956
for num_args, ctrl_types in pairs({
19481957
[0] = {"CancelButton", "OkButton",},
19491958
[2] = {"Button", "Checkbox", "CloseButton", "DataList", "Edit", "TextEditor",
1950-
"ListBox", "Popup", "Slider", "Static", "Switcher", "Tree", "UpDown",
1959+
"ListBox", "Popup", "Slider", "Static", "Switcher", "Tree", "UpDown", "ComboBox",
19511960
},
1952-
[3] = {"HorizontalLine", "VerticalLine",},
1961+
[3] = {"HorizontalLine", "VerticalLine", "RadioButtonGroup"},
19531962
}) do
19541963
for _, control_type in pairs(ctrl_types) do
1955-
if not finale.FCCustomWindow.__class["Create" .. control_type] then
1964+
local type_exists = false
1965+
if finenv.IsRGPLua then
1966+
type_exists = finale.FCCustomWindow.__class["Create" .. control_type]
1967+
else
1968+
1969+
for k, _ in pairs(finale.FCCustomWindow.__class) do
1970+
if tostring(k) == "Create" .. control_type then
1971+
type_exists = true
1972+
break
1973+
end
1974+
end
1975+
end
1976+
if not type_exists then
19561977
goto continue
19571978
end
19581979
methods["Create" .. control_type] = function(self, ...)
@@ -2937,7 +2958,7 @@ package.preload["mixin.FCXCtrlUpDown"] = package.preload["mixin.FCXCtrlUpDown"]
29372958

29382959
if private[self].AlignWhenMoving then
29392960

2940-
local num_steps = tonumber(tostring(value / step_def.value))
2961+
local num_steps = tonumber(tostring(value / step_def.value)) or 0
29412962
if num_steps ~= math.floor(num_steps) then
29422963
if delta > 0 then
29432964
value = math.ceil(num_steps) * step_def.value

dist/cue_notes_create.lua

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2134,18 +2134,27 @@ package.preload["mixin.FCMCustomWindow"] = package.preload["mixin.FCMCustomWindo
21342134
local methods = class.Methods
21352135
local private = setmetatable({}, {__mode = "k"})
21362136
local function create_control(self, func, num_args, ...)
2137-
local control = self["Create" .. func .. "__"](self, ...)
2138-
private[self].Controls[control:GetControlID()] = control
2139-
control:RegisterParent(self)
2137+
local result = self["Create" .. func .. "__"](self, ...)
2138+
local function add_control(control)
2139+
private[self].Controls[control:GetControlID()] = control
2140+
control:RegisterParent(self)
2141+
end
2142+
if func == "RadioButtonGroup" then
2143+
for control in each(result) do
2144+
add_control(control)
2145+
end
2146+
else
2147+
add_control(result)
2148+
end
21402149
local control_name = select(num_args + 1, ...)
21412150
if control_name then
21422151
control_name = type(control_name) == "userdata" and control_name.LuaString or control_name
21432152
if private[self].NamedControls[control_name] then
21442153
error("A control is already registered with the name '" .. control_name .. "'", 2)
21452154
end
2146-
private[self].NamedControls[control_name] = control
2155+
private[self].NamedControls[control_name] = result
21472156
end
2148-
return control
2157+
return result
21492158
end
21502159

21512160
function class:Init()
@@ -2179,12 +2188,24 @@ package.preload["mixin.FCMCustomWindow"] = package.preload["mixin.FCMCustomWindo
21792188
for num_args, ctrl_types in pairs({
21802189
[0] = {"CancelButton", "OkButton",},
21812190
[2] = {"Button", "Checkbox", "CloseButton", "DataList", "Edit", "TextEditor",
2182-
"ListBox", "Popup", "Slider", "Static", "Switcher", "Tree", "UpDown",
2191+
"ListBox", "Popup", "Slider", "Static", "Switcher", "Tree", "UpDown", "ComboBox",
21832192
},
2184-
[3] = {"HorizontalLine", "VerticalLine",},
2193+
[3] = {"HorizontalLine", "VerticalLine", "RadioButtonGroup"},
21852194
}) do
21862195
for _, control_type in pairs(ctrl_types) do
2187-
if not finale.FCCustomWindow.__class["Create" .. control_type] then
2196+
local type_exists = false
2197+
if finenv.IsRGPLua then
2198+
type_exists = finale.FCCustomWindow.__class["Create" .. control_type]
2199+
else
2200+
2201+
for k, _ in pairs(finale.FCCustomWindow.__class) do
2202+
if tostring(k) == "Create" .. control_type then
2203+
type_exists = true
2204+
break
2205+
end
2206+
end
2207+
end
2208+
if not type_exists then
21882209
goto continue
21892210
end
21902211
methods["Create" .. control_type] = function(self, ...)
@@ -3169,7 +3190,7 @@ package.preload["mixin.FCXCtrlUpDown"] = package.preload["mixin.FCXCtrlUpDown"]
31693190

31703191
if private[self].AlignWhenMoving then
31713192

3172-
local num_steps = tonumber(tostring(value / step_def.value))
3193+
local num_steps = tonumber(tostring(value / step_def.value)) or 0
31733194
if num_steps ~= math.floor(num_steps) then
31743195
if delta > 0 then
31753196
value = math.ceil(num_steps) * step_def.value

dist/cue_notes_overlay.lua

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1902,18 +1902,27 @@ package.preload["mixin.FCMCustomWindow"] = package.preload["mixin.FCMCustomWindo
19021902
local methods = class.Methods
19031903
local private = setmetatable({}, {__mode = "k"})
19041904
local function create_control(self, func, num_args, ...)
1905-
local control = self["Create" .. func .. "__"](self, ...)
1906-
private[self].Controls[control:GetControlID()] = control
1907-
control:RegisterParent(self)
1905+
local result = self["Create" .. func .. "__"](self, ...)
1906+
local function add_control(control)
1907+
private[self].Controls[control:GetControlID()] = control
1908+
control:RegisterParent(self)
1909+
end
1910+
if func == "RadioButtonGroup" then
1911+
for control in each(result) do
1912+
add_control(control)
1913+
end
1914+
else
1915+
add_control(result)
1916+
end
19081917
local control_name = select(num_args + 1, ...)
19091918
if control_name then
19101919
control_name = type(control_name) == "userdata" and control_name.LuaString or control_name
19111920
if private[self].NamedControls[control_name] then
19121921
error("A control is already registered with the name '" .. control_name .. "'", 2)
19131922
end
1914-
private[self].NamedControls[control_name] = control
1923+
private[self].NamedControls[control_name] = result
19151924
end
1916-
return control
1925+
return result
19171926
end
19181927

19191928
function class:Init()
@@ -1947,12 +1956,24 @@ package.preload["mixin.FCMCustomWindow"] = package.preload["mixin.FCMCustomWindo
19471956
for num_args, ctrl_types in pairs({
19481957
[0] = {"CancelButton", "OkButton",},
19491958
[2] = {"Button", "Checkbox", "CloseButton", "DataList", "Edit", "TextEditor",
1950-
"ListBox", "Popup", "Slider", "Static", "Switcher", "Tree", "UpDown",
1959+
"ListBox", "Popup", "Slider", "Static", "Switcher", "Tree", "UpDown", "ComboBox",
19511960
},
1952-
[3] = {"HorizontalLine", "VerticalLine",},
1961+
[3] = {"HorizontalLine", "VerticalLine", "RadioButtonGroup"},
19531962
}) do
19541963
for _, control_type in pairs(ctrl_types) do
1955-
if not finale.FCCustomWindow.__class["Create" .. control_type] then
1964+
local type_exists = false
1965+
if finenv.IsRGPLua then
1966+
type_exists = finale.FCCustomWindow.__class["Create" .. control_type]
1967+
else
1968+
1969+
for k, _ in pairs(finale.FCCustomWindow.__class) do
1970+
if tostring(k) == "Create" .. control_type then
1971+
type_exists = true
1972+
break
1973+
end
1974+
end
1975+
end
1976+
if not type_exists then
19561977
goto continue
19571978
end
19581979
methods["Create" .. control_type] = function(self, ...)
@@ -2937,7 +2958,7 @@ package.preload["mixin.FCXCtrlUpDown"] = package.preload["mixin.FCXCtrlUpDown"]
29372958

29382959
if private[self].AlignWhenMoving then
29392960

2940-
local num_steps = tonumber(tostring(value / step_def.value))
2961+
local num_steps = tonumber(tostring(value / step_def.value)) or 0
29412962
if num_steps ~= math.floor(num_steps) then
29422963
if delta > 0 then
29432964
value = math.ceil(num_steps) * step_def.value

dist/deletion_chooser.lua

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1808,18 +1808,27 @@ package.preload["mixin.FCMCustomWindow"] = package.preload["mixin.FCMCustomWindo
18081808
local methods = class.Methods
18091809
local private = setmetatable({}, {__mode = "k"})
18101810
local function create_control(self, func, num_args, ...)
1811-
local control = self["Create" .. func .. "__"](self, ...)
1812-
private[self].Controls[control:GetControlID()] = control
1813-
control:RegisterParent(self)
1811+
local result = self["Create" .. func .. "__"](self, ...)
1812+
local function add_control(control)
1813+
private[self].Controls[control:GetControlID()] = control
1814+
control:RegisterParent(self)
1815+
end
1816+
if func == "RadioButtonGroup" then
1817+
for control in each(result) do
1818+
add_control(control)
1819+
end
1820+
else
1821+
add_control(result)
1822+
end
18141823
local control_name = select(num_args + 1, ...)
18151824
if control_name then
18161825
control_name = type(control_name) == "userdata" and control_name.LuaString or control_name
18171826
if private[self].NamedControls[control_name] then
18181827
error("A control is already registered with the name '" .. control_name .. "'", 2)
18191828
end
1820-
private[self].NamedControls[control_name] = control
1829+
private[self].NamedControls[control_name] = result
18211830
end
1822-
return control
1831+
return result
18231832
end
18241833

18251834
function class:Init()
@@ -1853,12 +1862,24 @@ package.preload["mixin.FCMCustomWindow"] = package.preload["mixin.FCMCustomWindo
18531862
for num_args, ctrl_types in pairs({
18541863
[0] = {"CancelButton", "OkButton",},
18551864
[2] = {"Button", "Checkbox", "CloseButton", "DataList", "Edit", "TextEditor",
1856-
"ListBox", "Popup", "Slider", "Static", "Switcher", "Tree", "UpDown",
1865+
"ListBox", "Popup", "Slider", "Static", "Switcher", "Tree", "UpDown", "ComboBox",
18571866
},
1858-
[3] = {"HorizontalLine", "VerticalLine",},
1867+
[3] = {"HorizontalLine", "VerticalLine", "RadioButtonGroup"},
18591868
}) do
18601869
for _, control_type in pairs(ctrl_types) do
1861-
if not finale.FCCustomWindow.__class["Create" .. control_type] then
1870+
local type_exists = false
1871+
if finenv.IsRGPLua then
1872+
type_exists = finale.FCCustomWindow.__class["Create" .. control_type]
1873+
else
1874+
1875+
for k, _ in pairs(finale.FCCustomWindow.__class) do
1876+
if tostring(k) == "Create" .. control_type then
1877+
type_exists = true
1878+
break
1879+
end
1880+
end
1881+
end
1882+
if not type_exists then
18621883
goto continue
18631884
end
18641885
methods["Create" .. control_type] = function(self, ...)
@@ -2843,7 +2864,7 @@ package.preload["mixin.FCXCtrlUpDown"] = package.preload["mixin.FCXCtrlUpDown"]
28432864

28442865
if private[self].AlignWhenMoving then
28452866

2846-
local num_steps = tonumber(tostring(value / step_def.value))
2867+
local num_steps = tonumber(tostring(value / step_def.value)) or 0
28472868
if num_steps ~= math.floor(num_steps) then
28482869
if delta > 0 then
28492870
value = math.ceil(num_steps) * step_def.value

0 commit comments

Comments
 (0)