TimGS,
I tried your code as I was attempting to setup a pendant in MACH4. I was able to build the LUA panel as you described and copied all your PNG images into an image directory under Wizards, etc. The code dies when it hits line 22.
panel:SetBackgroundColour(wx.wxColour(255,255,255));
I am struggling to figure out what is wrong. It never displays your images. I am using screen set WX4, this code seems to reference wx. but I looked online and saw many other examples that do the same thing so I am kind of stumped. I can not find these commands in any of the LUA manuals or the MACH4 script manual. Any guidance? thanks
I know this is an old thread but looked like a good learning tool.
Thanks
Russ
At Breakpoint line: 21 file: C:\Users\rdlarson\Documents\MACH4\mypanelscriptRev5.mcs
At Breakpoint line: 22 file: C:\Users\rdlarson\Documents\MACH4\mypanelscriptRev5.mcs
mcLua ERROR: Lua: Error while running chunk
[string "C:\Users\rdlarson\Documents\MACH4\mypanelscri..."]:22: attempt to index upvalue 'panel' (a nil value)
stack traceback:
[string "C:\Users\rdlarson\Documents\MACH4\mypanelscri..."]:22: in function 'main'
[string "C:\Users\rdlarson\Documents\MACH4\mypanelscri..."]:415: in main chunk
mcLua ERROR: Lua: Error while running chunk
Debug session finished.