Problems with setTitle
Problems with setTitle
- Subject: Problems with setTitle
- From: Bertrand Mansion <email@hidden>
- Date: Sun, 13 Jan 2002 20:36:20 +0100
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 ?
Thanks,
Bertrand Mansion