Is it possible to use self in evt_table functions?
Posted: Tue Jul 18, 2017 6:04 am
This isnt the only situation where I have encountered this problem, but just as example.
Suppose I am making a button, so i make:
Problem is the evt_table part.
Suppose i have a function:
but now when i try to use it on evt_table:
it doesnt work.
Is there a way to access a self function in situation like this, or am i forced to not use self in situations like this?
Suppose I am making a button, so i make:
Code: Select all
makebutton(1, #LAYERBUTTON, "brushname", false, false, evt_table)
Suppose i have a function:
Code: Select all
function myfunc:changeX
self.x = mousex()
endfunction
Code: Select all
evt_table={OnMouseDown = myfunc:changeX}
Is there a way to access a self function in situation like this, or am i forced to not use self in situations like this?