Hello, I'm currently learning on my own how to program in cocoa, and its quite fun, but i ve run into a few little problems, and I would love some help.
Ok, so first of all , i have My main window nib file with a button that uppon beeing pressed lauches a secondary window. This secondary window is an instance of NSWindowController, it launches properly with this code
and from my mainAppController :
Now, on this secondary window i decided to add a textfield so that i can "fill" it when the window loads ( so that later on i can fill it with precalculated values from a sqlite file).
so I added the outlet on the .h file, added an NSObject from the interface builder, set its type to the NWwindowController class ( NewBill)
set the link in interface builder and added this
in the header :
So the compiel works, no errors, no warnings, my button still spawns the new window, but no text is in the NSTextField.
what could be going on?
Ok, so first of all , i have My main window nib file with a button that uppon beeing pressed lauches a secondary window. This secondary window is an instance of NSWindowController, it launches properly with this code
Code:
@interface NewBill : NSWindowController {
}
Code:
//
// NewBill.m
// Facturacion
//
// Created by Charles Romestant on 1/28/09.
// Copyright 2009 __MyCompanyName__. All rights reserved.
//
#import "NewBill.h"
@implementation NewBill
- (id) init {
if ( ! (self = [super initWithWindowNibName: @"nibFactura"]) ) {
NSLog(@"init failed in TheWindowController");
return nil;
} // end if
NSLog(@"init OK in TheWindowController");
return self;
} // end init
- (void)windowDidLoad {
NSLog(@"TheWindowPanel did load");
} // end windowDidLoad
@end
and from my mainAppController :
Code:
//
// AppController.m
// Facturacion
//
// Created by Charles Romestant on 1/28/09.
// Copyright 2009 __MyCompanyName__. All rights reserved.
//
#import "AppController.h"
#import "NewBill.h"
@implementation AppController
-(IBAction) showTheWindow:(id)pId;
{
NSLog(@"Hi from TheAppController showTheWindow");
if (! BillWindow ) {
BillWindow = [[NewBill alloc] init];
} // end if
[BillWindow showWindow:self];
}
@end
so I added the outlet on the .h file, added an NSObject from the interface builder, set its type to the NWwindowController class ( NewBill)
set the link in interface builder and added this
in the header :
Code:
IBOutlet NSTextField *numControl;
Code:
[numControl setStringValue:@"Loaded from NewBill.m"];
So the compiel works, no errors, no warnings, my button still spawns the new window, but no text is in the NSTextField.
what could be going on?