Good morning all,
I am working through an example that demos the use of multiple nibs/controllers.
The initial controller is initialized in code thus, in the AppDelegate.m file . (GC enabled).
So, I have a couple of questions.
1) It would seem that the initialization/allocation( in the delegate method "applicationDid.....") would simply be released at the end of the function. Yet, the example works as expected. What am i missing?
2) Is it possible to do the same in IB i.e. declare an object of class "MyWindowController". If so, how to associate this with the nib named "MainWindow" or is this simply poor programming style?
Thanks in advance?
I am working through an example that demos the use of multiple nibs/controllers.
The initial controller is initialized in code thus, in the AppDelegate.m file . (GC enabled).
Code:
#import "HelloApplicationAppDelegate.h"
#import "MyWindowController.h"
@implementation HelloApplicationAppDelegate
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
[[MyWindowController alloc]initWithWindowNibName:@"MainWindow"];
}
So, I have a couple of questions.
1) It would seem that the initialization/allocation( in the delegate method "applicationDid.....") would simply be released at the end of the function. Yet, the example works as expected. What am i missing?
2) Is it possible to do the same in IB i.e. declare an object of class "MyWindowController". If so, how to associate this with the nib named "MainWindow" or is this simply poor programming style?
Thanks in advance?