From: BurningShadow (Flemming) <fle...@sy...> - 2006-08-28 13:16:21
|
I need some help with threads, but I'm not sure what it is I want to know ;( If we imagine some code that looks like this: case M_BUTTON: { LaunchApp( "/Applications/AView/AView" ); } void MainWindow::LaunchApp( const os::String cApp ) { system( cApp.c_str() ); } This should start AView (I might have made an mistake somewhere, but that's not point). Now, to the thread problem. I found this example: http://www.syllable.org/docs/0.6.0/gui/classos_1_1Thread.html ...and modified it a bit: class MyThread : public Thread { public: MyThread() : Thread( "MyThread" ) {} int32 Run() { system( "/Applications/AView/AView" ); return 0; } }; int main(void) { MyThread thread; thread.Start(); return 0; } That works, but what do I do, to make it work like the first example (using cApp instead of "/Appli.../AView")? Am I making any sense? |