Posted 24 March 2015 - 10:28 AM
Hi,
The stickied post advises that I should provide a good over view of what I want/expect my code to do but I'm by no means great at programming and even worse at explaining it, but I'll try.
The generalitys of the situation is this. I have some deep experience with another language (C#) and while most of my experience doesn't transfer over to LUA (in fact some of it causes flat-forehead moments) mostly what I'm strugling with is the lack of (or percieved lack of) threading. To get to the point I have a computer that I wish to display a bar graph, a couple updating labels (Current stored RF, Run time, ect) and two buttons (On and Off). Writing the API needed for the actual displaying of these elements was realtivly easy (with the guiding hand of various Button API's). The issue I have is that the code that will be waiting for input (monitor_touch event) will block the rest of the elements displayed on the monitor from updating. In C# I'd handle this by spinning off a thread to hanlde the updating of the GUI so the processing code could still function but as far as my google-fu and sreaching of these forums has availed me I can't seem to find anything like that for LUA or CC. Of course this is 6AM so I'm more then likely missing something obvious but on the off chance I am not I'd like some advice.
I don't really need any hard code examples, just a push in the right direction. Is there something I am missing that can be used like the Thread class in C#? Something that will allow one code path to wait for user input while the rest of the code path continues as normal?
Thanks for any help.
The stickied post advises that I should provide a good over view of what I want/expect my code to do but I'm by no means great at programming and even worse at explaining it, but I'll try.
The generalitys of the situation is this. I have some deep experience with another language (C#) and while most of my experience doesn't transfer over to LUA (in fact some of it causes flat-forehead moments) mostly what I'm strugling with is the lack of (or percieved lack of) threading. To get to the point I have a computer that I wish to display a bar graph, a couple updating labels (Current stored RF, Run time, ect) and two buttons (On and Off). Writing the API needed for the actual displaying of these elements was realtivly easy (with the guiding hand of various Button API's). The issue I have is that the code that will be waiting for input (monitor_touch event) will block the rest of the elements displayed on the monitor from updating. In C# I'd handle this by spinning off a thread to hanlde the updating of the GUI so the processing code could still function but as far as my google-fu and sreaching of these forums has availed me I can't seem to find anything like that for LUA or CC. Of course this is 6AM so I'm more then likely missing something obvious but on the off chance I am not I'd like some advice.
I don't really need any hard code examples, just a push in the right direction. Is there something I am missing that can be used like the Thread class in C#? Something that will allow one code path to wait for user input while the rest of the code path continues as normal?
Thanks for any help.