I have a controller class : AppController
AppController.h
IBOutlet NSTextField *m_field_status;
- (void)setStatus;
- (void)finishUpgrading;
AppController.m
- (id)init
{
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
[nc addObserver:self selector
selector(finishUpgrading) name:EnumerationFinishedNotification object:nil];
}
- (void)setStatus
{
[m_field_status setString: @"Starting..."];
}
- (void)finishUpgrading
{
NSString *str = @"Starting...";
[str stringByAppendingString
"finished"];
[m_field_status setString:str];
}
I have another class: Upgrade. It will post Notification (finishUpgrading) to AppController class after finishing the upgrading.
Now the problem is that the NSTextField can't show message immediately after receiving the notification.
I have loaded the current view after receiving the notification.But it can't make any sense.
AppController.h
IBOutlet NSTextField *m_field_status;
- (void)setStatus;
- (void)finishUpgrading;
AppController.m
- (id)init
{
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
[nc addObserver:self selector
}
- (void)setStatus
{
[m_field_status setString: @"Starting..."];
}
- (void)finishUpgrading
{
NSString *str = @"Starting...";
[str stringByAppendingString
[m_field_status setString:str];
}
I have another class: Upgrade. It will post Notification (finishUpgrading) to AppController class after finishing the upgrading.
Now the problem is that the NSTextField can't show message immediately after receiving the notification.
I have loaded the current view after receiving the notification.But it can't make any sense.