PDA

View Full Version : call other class function using object in Run() method of Thread class



santosh.kumar
16th May 2007, 10:28
hi

///first file

#include "Guiclass.h"
////
void threadclass::run()
{
Guiclass *obj = NULL;
obj = new GuiClass;
while(!bFalse)
{
obj->func();
}
}

////Gui class
void Guiclass::func()
{
///
}


But it is not working...program becomes crashed...why

marcel
16th May 2007, 10:56
Come on, man!
It is stated in several posts:
DO NOT CREATE/MODIFY WIDGETS FROM OTHER THREADS!!!

santosh.kumar
16th May 2007, 10:58
can u give some example for this....i have some confusion





Come on, man!
It is stated in several posts:
DO NOT CREATE/MODIFY WIDGETS FROM OTHER THREADS!!!

wysota
16th May 2007, 11:07
You have been given an infraction for multiposting. This thread is now being closed. Please continue in the original thread and for God's sake read what Marcel writes you :)