Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
cocob is currently offline  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();
}


 
Read Message
Read Message
Previous Topic: How to modify Page setup (left margin) in RichText Control
Next Topic: Controls & classes design questions
Goto Forum:
  


Current Time: Fri Jun 06 23:13:56 CEST 2025

Total time taken to generate the page: 0.04270 seconds