Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Multithreading ans updating widgets
Multithreading ans updating widgets [message #14726] |
Tue, 11 March 2008 11:48 |
cocob
Messages: 156 Registered: January 2008
|
Experienced Member |
|
|
Hello,
I have some problems with GUI en multithreading with U++.
My app crash when a thread modify the content of a lineEdit widget.
I think an other thread is trying to read data from this lienEdit to display it at the same time.
How can i disable updating events when i modify my widgets values ?
Thank you for your help
A simple example that produce the problem.
#include "mt.h"
void mt::theThread()
{
while(true) {
String text = console.Get();
text << "Some Text\n";
console.Set(text);
}
}
void mt::startButtonEvent()
{
Thread().Run(THISBACK(theThread));
}
mt::mt()
{
CtrlLayout(*this, "Window title");
startButton << THISBACK(startButtonEvent);
}
GUI_APP_MAIN
{
mt().Run();
}
|
|
|
|
Goto Forum:
Current Time: Fri Mar 29 13:00:32 CET 2024
Total time taken to generate the page: 0.01323 seconds
|