NSWindowController MyDocument not appearing
NSWindowController MyDocument not appearing
- Subject: NSWindowController MyDocument not appearing
- From: Soares <email@hidden>
- Date: Sun, 6 May 2007 17:07:54 +0100
// Commented out as recommended when overriding the makeWindowControllers
method
/*
- (NSString *)windowNibName
{
return @"MyDocument";
}
*/
- (void)makeWindowControllers
{
scOpenGLController = [[SCOpenGLController alloc] init];
[self addWindowController:scOpenGLController];
}
When I implement the above I lose "My Document" window. I suspect it has
something to do with File Owner's or some such thing from what I have read
on the subject, but I'm a little confused by what's going on.
SCOpenGLController.m contains the following excerpts and seems to work fine,
and my custom panel appears as desired, but I never get the "My Document"
window.
Any ideas?
- (id)init
{
if (self = [super initWithWindowNibName:@"MyDocument"])
{
[super initWithWindowNibName:@"SCOpenGL"];
}
return self;
}
- (NSString *)windowTitleForDocumentDisplayName: (NSString *)displayName
{
NSString *string;
string = [NSString stringWithFormat: @"Rendered view of %@",
displayName];
return string;
}
- (void)windowDidLoad
{
NSLog(@"Nib file is loaded");
}
Each document in the application has two windows:
1. Outline View <- File's owner is set to MyDocument
2. Opengl View <- File's owner is set to SCOpenGLController
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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