View Single Post
Old 10-23-2019, 10:18 AM   #547
babag
Human being with feelings
 
Join Date: Nov 2009
Posts: 2,227
Default

thanks, lokasenna. the basic drawing of the gui is working now. just tried the last code you put up and it also works fine.

now i'm getting something else, though. i put some custom actions into some of the buttons and, whenever i try to click one, the script crashes. here's the crash report:
Quote:
Error: toolbartest-02_GUI.lua:163: bad argument #1 to 'Main_OnCommand' (number expected, got nil)

Stack traceback:
Core.lua:88: in function <...am Scripts/Development/Lokasenna_GUI v2/Library/Core.lua:79>
[C]: in field 'Main_OnCommand'
toolbartest-02_GUI.lua:163: in field 'func'
Class - Button.lua:138: in method 'onmouseup'
Core.lua:883: in field 'Update'
Core.lua:435: in field 'Main_Update_Elms'
Core.lua:302: in function <...am Scripts/Development/Lokasenna_GUI v2/Library/Core.lua:298>
[C]: in function 'xpcall'
Core.lua:298: in function <...am Scripts/Development/Lokasenna_GUI v2/Library/Core.lua:297>

Lokasenna_GUI:
v2.16.8
Reaper:
5.984/linux64
Platform:
Other
i also have some buttons set to reaper native actions and they do not crash the script when clicked. any thoughts on this? does this not work with custom actions?

here's an offending custom action as listed in the script:
Code:
{ label = "REPLACE\nw1000ms", command = _fad0ff7281777ae665363b96d96f1651 },
and here's one that works:
Code:
{ label = "XFADE\nTOGGLE",    command = 40912 },
thanks,
babag
babag is offline   Reply With Quote