Re: NSTask Progress
Re: NSTask Progress
- Subject: Re: NSTask Progress
- From: Todd Heberlein <email@hidden>
- Date: Fri, 17 Aug 2001 16:49:40 -0700
On 8/16/01 12:30 PM, "David Kopec" <email@hidden> wrote:
>
and then be notified when it is finished. What would be
>
the easiest way to do this?
Use the NSNotificationCenter. Your could would look something like this:
- (void) awakeFromNib
{
[[NSNotificationCenter defaultCenter] addObserver: self
selector:@selector(notifyThatTaskStopped:)
name: NSTaskDidTerminateNotification
object: nil];
}
- (void)notifyThatTaskStopped: (NSNotification*)notification
{
NSLog(@"The task has ended: %@", [notification name]);
}
Todd