Skip navigation.
 
mlProblems with setTitle
FROM : Bertrand Mansion
DATE : Sun Jan 13 20:36:20 2002

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


Related mailsAuthorDate
mlProblems with setTitle Bertrand Mansion Jan 13, 20:36
mlRe: Problems with setTitle Lance Bland Jan 13, 21:34
mlRe: Problems with setTitle Lance Bland Jan 13, 21:53
mlRe: Problems with setTitle Vince DeMarco Jan 15, 03:58