anyway, if you add:
[code]//==============================================================================
class DemoBackgroundThread : public ThreadWithProgressWindow
{
public:
DemoBackgroundThread()
: ThreadWithProgressWindow (T(“busy doing some important things…”),
true,
true)
{
setStatusMessage (T(“Getting ready…”));
}
~DemoBackgroundThread()
{
}
void run()
{
setProgress (-1.0); // setting a value beyond the range 0 -> 1 will show a spinning bar..
setStatusMessage (T("Preparing to do some stuff..."));
wait (2000);
const int thingsToDo = 10;
for (int i = 0; i < thingsToDo; ++i)
{
// must check this as often as possible, because this is
// how we know if the user's pressed 'cancel'
if (threadShouldExit())
return;
// this will update the progress bar on the dialog box
setProgress (i / (double) thingsToDo);
setStatusMessage (String (thingsToDo - i) + T(" things left to do..."));
wait (500);
}
setProgress (-1.0); // setting a value beyond the range 0 -> 1 will show a spinning bar..
setStatusMessage (T("Finishing off the last few bits and pieces!"));
wait (2000);
}
};
[/code]
to the MainDemoWindow.cpp file and add:
[code] DemoBackgroundThread demoThread;
if (demoThread.runThread())
{
// thread finished normally..
AlertWindow::showMessageBox (AlertWindow::WarningIcon,
T("Progress window"),
T("Thread finished ok!"));
}
else
{
// user pressed the cancel button..
AlertWindow::showMessageBox (AlertWindow::WarningIcon,
T("Progress window"),
T("You pressed cancel!"));
}
[/code]
to one of the functions in the perform method, it fails to run properly on my Intel and G4 Macs, but runs fine on Windows