well, it's getting better. now it draws the window but crashes with no buttons displaying in the window. crash report:
Quote:
Error: Class - Button.lua:62: attempt to perform arithmetic on a string value (field 'h')
Stack traceback:
Core.lua:88: in metamethod '__add'
Class - Button.lua:62: in method 'init'
Core.lua:214: in field 'update_elms_list'
Core.lua:288: in function <...am Scripts/Development/Lokasenna_GUI v2/Library/Core.lua:233>
[C]: in function 'xpcall'
Core.lua:233: in field 'Init'
toolbartest-01_GUI.lua:42: in main chunk
Lokasenna_GUI:
v2.16.8
Reaper:
5.984/linux64
Platform:
Other
|
and, here's the current state of the code:
Code:
-- Script generated by Lokasenna's GUI Builder
local lib_path = reaper.GetExtState("Lokasenna_GUI", "lib_path_v2")
if not lib_path or lib_path == "" then
reaper.MB("Couldn't load the Lokasenna_GUI library. Please run 'Set Lokasenna_GUI v2 library path.lua' in the Lokasenna_GUI folder.", "Whoops!", 0)
return
end
loadfile(lib_path .. "Core.lua")()
GUI.req("Classes/Class - Button.lua")()
-- If any of the requested libraries weren't found, abort the script.
if missing_lib then return 0 end
GUI.name = "Toolbar Test GUI"
GUI.x, GUI.y, GUI.w, GUI.h = 0, 0, 1024, 240
GUI.anchor, GUI.corner = "mouse", "C"
local toolbar_buttons = {
{ label = "XFADE\nON", command = 40927 },
{ label = "XFADE\nOFF", command = 40928 },
}
local button_width = 62
for k, v in ipairs(toolbar_buttons) do
GUI.New("btn_"..k, "Button", (k - 1) * button_width, 0, button_width, 24, v.label, function() reaper.Main_OnCommand(v.command, 0) end)
end
GUI.Init()
GUI.Main()
thanks again,
babag