Maybe I'm missing something really simple here (I hope so), but is there a trick to changing the title of an NSPanel at runtime? The obvious [panel setTitle:@"New title"] doesn't seem to be working.
I'm trying to display a regular panel which contains a WebView, and I want to the title of the panel to reflect the title of the HTML content.
I subclassed NSWindowController and called initWithWindowNibName. I changed the class in the nib from NSWindow to NSPanel, and everything seems to be working okay. In my window controller, I did this:
- (void)windowDidLoad {
[super windowDidLoad];
[[self window] setTitle:@"My New Title"];
}
(I will actually be setting the title in a webView:didReceiveTitle:forFrame delegate, but this is simpler to show).
I verified that the code is getting called, and there are no errors reported, but the title never changes. Any ideas?