downtownsilikon.blogg.se

Lua minify
Lua minify











  1. #Lua minify registration#
  2. #Lua minify code#

The big difficulty (well, if you're not accustomed to collaborative threading) is that a coroutine should yield itself: it's not the calling function that's in charge of returning control. You should probably take a good look at Programming in Lua, chapter 9: Coroutines. when aborting, you get asked what to do instead of continuing, type something containing y or Y to continue, all else aborts. Print('isContinue interrupted keyhandler') Stat,cont,action = coroutine.resume(coro) Local coro = coroutine.create(isContinue) Return nil,'STOP' - important to tell key_handler to quit too, else it'll be calling a dead coroutine. If action:match('kill') then - abort keychecker. in whatever framework you're using there will probably be a function key_pressed or the like. The thing you need to could do is have a coroutine that's called in your key handler, which passes an argument back to your handler: function isContinue() -just to simulate whatever function you use getting keypresses. However I'm beginning to see where you want to go.

#Lua minify code#

If you're describing a Lua problem, use Lua code to describe it. Your code snippet is still largely non-informative (ideally one should be able to just run your code in a stock Lua interpreter and see your problem). In the Minifier comments and unneeded white space characters (space, newline, and tab) are removed.

lua minify

Minifier removes unnecessary characters from a JS to reduce its size, thereby improving load times. Input the JS code and tool will compress and minify all of your JS. One more thing, i ahve followed the C syntax to explain, however this is completely implemented in lua Online JS Minifier Tools is used to minify JS. I am really sorry, but i am not good at expressing or making others understand. I hope this explanation is much simpler and have made my point, and will help others to understand the problem. Now, once entered into key_handler, while he is busy drawing the points unless and until the failing condition occurs, i am unable to receive key pressed till that time. draw Points until some condition goes wrong Then what should be the solution, please guide me through here is the prototype of what i am trying to achieve: function key_handler() //this function will get the latest key pressed from some other function

lua minify

#Lua minify registration#

Now in reg.c i have a function engine which receives the key pressed and passes it to the lua function responsible for key handling.īut by the time key event comes, lua code is done with the registration and exits, thus the call from engine() becomes illegal memory access leading to segmentation fault.Īlso i suppose we can't have lua call hanging in reg function, and call engine function from somewhere else. This lua code calls reg.c, where it kind of registers. I have written a program in lua, say a which on receiving key event should modify the coordinates and display the geometry figure. I have a problem which i suppose must be very common and most of you would have faced it.













Lua minify