Fist Posted September 10, 2015 Share Posted September 10, 2015 Hello everyone. Just askin or it is possible to destroy function? Like if key Z is executed and it executes EXAMPLE function and if i press again Z it destroys that function, and over again same process. Link to comment
JR10 Posted September 10, 2015 Share Posted September 10, 2015 Take a look at unbindKey Link to comment
Fist Posted September 10, 2015 Author Share Posted September 10, 2015 Take a look at unbindKey That would not fix my problem, i need exaclty what destroys function, cause i need it so in background doesnt run a useless gui when its not used. Link to comment
Moderators IIYAMA Posted September 10, 2015 Moderators Share Posted September 10, 2015 function myFunctionName () end myFunctionName = nil -- delete Link to comment
Fist Posted September 10, 2015 Author Share Posted September 10, 2015 function myFunctionName () end myFunctionName = nil -- delete doesnt work. Link to comment
JR10 Posted September 10, 2015 Share Posted September 10, 2015 There's no such thing as "destroying" a function. Once it's bound to a command or a key, even nullifying the function's variable won't stop its execution. Link to comment
Fist Posted September 10, 2015 Author Share Posted September 10, 2015 There's no such thing as "destroying" a function. Once it's bound to a command or a key, even nullifying the function's variable won't stop its execution. Ok, thanks anyway. Link to comment
ixjf Posted September 11, 2015 Share Posted September 11, 2015 As long as the function is referenced somewhere, Lua's garbage collector won't remove it. You'll have to unbind the key from that function to stop it. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now