Re: Problems with setTitle
Re: Problems with setTitle
- Subject: Re: Problems with setTitle
- From: Vince DeMarco <email@hidden>
- Date: Mon, 14 Jan 2002 18:58:06 -0800
On Sunday, January 13, 2002, at 11:36 AM, Bertrand Mansion wrote:
Hi all,
I can't set the title for my window. Here is the simple code I am using :
@implementation MyWindow
- (id)initWithContentRect:(NSRect)contentRect styleMask:(unsigned
int)aStyle
backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag
{
NSWindow* window = [super initWithContentRect:contentRect
styleMask:(NSTitledWindowMask | NSClosableWindowMask)
backing:NSBackingStoreBuffered defer:NO];
[window setTitle:@"My window"];
NSLog(@"Window title : %@.\n", [window title]);
return window;
}
@end
The window display as I want it with the right buttons but the title is
still the one I have in IB and not "My window" as I would like it to be.
But
the NSLog returns "My window" right"...
Any suggestions ?
Are you using a NSWindowController to load the nib file???
vince