Home » U++ Library support » U++ Widgets - General questions or Mixed problems » UI window threading problem
UI window threading problem [message #39790] |
Sun, 28 April 2013 22:28 |
crydev
Messages: 151 Registered: October 2012 Location: Netherlands
|
Experienced Member |
|
|
Hello,
I ran into a problem that I initially fixed, but I'm not convinced that there isn't a better way of solving it. My problem is as following.
I have a main window that is capable of opening another window that runs non-modal above the main window, meaning the main window is not clickable nor focusable while the opened window is still opened. The non-modal window enables the user to select parameters for a memory scan, and by clicking OK the memory scan has to be started. The problem I ran into in the first place was that I had to be able to make the non-modal window access a function in the main window. That isn't too hard to fix, but the next problem is, that the non-modal window keeps on top, non-responsive, until the memory scan that is started is finished. My fix to that problem was creating a new thread that started the memory scan, in order to keep any possible piece of UI responsive. Downside: I had many exceptions that were very hard to find, due to the threading between the UI parts.
Now that I all fixed it, I wonder: isn't there a better solution to achieve the non-modal window to be closed, without the need of a thread?
Thanks in advance!
crydev
|
|
|
Goto Forum:
Current Time: Fri Sep 20 08:11:33 CEST 2024
Total time taken to generate the page: 0.02668 seconds
|