• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Problems with setTitle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Problems with setTitle
      • From: Vince DeMarco <email@hidden>
    • Re: Problems with setTitle
      • From: Lance Bland <email@hidden>
    • Re: Problems with setTitle
      • From: Lance Bland <email@hidden>
  • Prev by Date: Custom Menus
  • Next by Date: Re: Preventing Window Dragging
  • Previous by thread: Re: Custom Menus
  • Next by thread: Re: Problems with setTitle
  • Index(es):
    • Date
    • Thread