windowDidLoad not getting called
windowDidLoad not getting called
- Subject: windowDidLoad not getting called
- From: Dave <email@hidden>
- Date: Thu, 19 Mar 2015 18:24:39 +0000
Hi,
I have a Window Controller (LTWWindowControllerX) that loads a window from a NIB file. I have a class called “LTWWindowX” (it inherits from NSWindow) which is a non-standard window in that it has the appearance of a “Stickies” or “Tool Palette”.
The File’s Owner in the NIB is set to LTWWindowControllerX.
The NIB File also contains LTWWindowX (an NSWindow with the Class set to LTWWindowX) and has some views inside it. There are also a couple of IBOutlet properties that are hooked to properties in LTWWindowX.
The Window is Initialised with the following code in LTWWindowControllerX:
-(instancetype) initWithWindowKind:(NSString*) theWindowKind
{
NSString* myNIBName;
myNIBName = @"LTWWindowX";
self = [super initWithWindowNibName:myNIBName];
if (self == nil)
return nil;
return self;
}
Also in LTWWindowControllerX I have the windowDidLoad defined:
-(void) windowDidLoad
{
NSLog(@"***************windowDidLoad***********************");
[super windowDidLoad];
}
——————————————————
The Window Controller is instantiated with this code:
myWindowController = [[LTWWindowControllerX alloc] initWithWindowKind:@""];
[myWindowController loadWindow];
windowDidLoad doesn’t get called and the “window” property of LTWWindowControllerX doesn’t get set.
I’m wondering why and if I need to something “special” in order to make this work?
I based this code on the Core Data Stickies sample.
Any help would be greatly appreciated.
All the Best
Dave
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden