Does any of you know how to store a LUA function in my field?
I've tried to use lua_tocfunction() but can't get it to really work...
What I basically want to do is have a button in BlitzMax as the type Gadget with a field called Func() and then in LUA do something like
function Clicked()
print("Hey!")
end
gadgetfunction(Clicked)
Which would set my Func() field into the LUA function Clicked(), then when I click the button just call Func()
I guess what I'm asking is... how do I pass a function as a parameter in LUA?
I've tried to use lua_tocfunction() but can't get it to really work...
What I basically want to do is have a button in BlitzMax as the type Gadget with a field called Func() and then in LUA do something like
function Clicked()
print("Hey!")
end
gadgetfunction(Clicked)
Which would set my Func() field into the LUA function Clicked(), then when I click the button just call Func()
I guess what I'm asking is... how do I pass a function as a parameter in LUA?