user-stoppable program
user-stoppable program
- Subject: user-stoppable program
- From: email@hidden
- Date: Thu, 25 May 2006 10:20:02 +0200 (CEST)
- Importance: Normal
Hello all,
in a document-based Cocoa project the window has several table views and
two buttons
``Launch" and ``Stop It", corresponding to the following methods in
MyDocument.m :
-(IBAction) goOnAndOn : (id) sender
{
while (watchDog) {
[self goForward];
[self updateUI];
}
}
-(IBAction) stopItAll : (id) sender
{
watchDog=NO;
}
This does not work at all, because the Button ``Stop It" is disabled when
the program is
busy. What is the proper way to do this ? Should I use delegates ? In
which class ?
Ewan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden