How do I call setStatus
from within awakeFromNib
?
-(void)awakeFromNib {
setStatus; // how?
}
/* Function for setting window status */
- (void)setStatus {
[statusField setStringValue:@"Idle"];
}
How do I call setStatus
from within awakeFromNib
?
-(void)awakeFromNib {
setStatus; // how?
}
/* Function for setting window status */
- (void)setStatus {
[statusField setStringValue:@"Idle"];
}
In Objective-C, you use self
to refer to the current object:
[self setStatus];
Maybe you might want to revise that method to be this:
- ( void ) setStatus: ( NSString *) status {
[ statusField setStringValue: status ];
}
You can then call it like this:
[ self setStatus: @"Idle" ];
Thanks..
And if I want to have variables in my string?
F.ex:
[self setStatus:@"Analysing %@", sourceFile];