I am working on my forst Cocoa project and have come up against a strange problem I cannot solve.
This app is a small menu bar application, with a menu and 2 dialogs.
Then the dialogs are shown, some data is displayed, however, for some reason, the NSTextfields, in fact none of the controls are being updated.
The main delegate have this method to show the window:
whilst in the kp_VapingController, I currently have the following code:
Neither the NSTextField spent, nor the windows title are being updated.
Any help would be greatly appreciated.
This app is a small menu bar application, with a menu and 2 dialogs.
Then the dialogs are shown, some data is displayed, however, for some reason, the NSTextfields, in fact none of the controls are being updated.
The main delegate have this method to show the window:
Code:
-(IBAction)doAdd:(id)sender
{
if(!vapingController)
{
vapingController = [[kp_VapingSpendController alloc] initWithWindowNibName:@"Add Vaping Spend"];
}
[vapingController showWindow:self];
}
whilst in the kp_VapingController, I currently have the following code:
Code:
@interface kp_VapingSpendController ()
@end
@implementation kp_VapingSpendController
- (id)initWithWindow:(NSWindow *)window
{
self = [super initWithWindow:window];
if (self) {
// Initialization code here.
}
return self;
}
- (void)windowDidLoad
{
[super windowDidLoad];
// Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
[spent setStringValue:@"0.00"];
[[self window] setTitle:@"Test"];
}
@end
Neither the NSTextField spent, nor the windows title are being updated.
Any help would be greatly appreciated.