[myWindow setTitle:@"Whatever you want to call it"];
Not sure what you mean about text at the bottom. Like a status bar? That's not a standard component of a Cocoa window. But you can easily add one, just add a text field at the bottom in Interface Builder and change the text in the text field using:
Code:
[myStatusBarTextView setStringValue:@"Status text here"];
(setStringValue: is a method that NSTextField inherits from NSControl) Make sure you set the text field and any box it's in to stick to the bottom of the frame and expand horizontally with window resizing.
Uhm, yeah. You can update a window's title from anywhere you can get the window object.
In an NSDocument you can get the owning window and change its title using:
Code:
[[self window] setTitle:str];
Where you do it is up to you. There are various methods that get invoked in NSDocument when a document window is created, and it can get more complicated with custom window controllers and so on. So where you do it depends on how you setup the NSDocument-based app.
The window title of a document window in a document-based app is set automatically (to the name of the associated file) and you cannot set it. -setTitle: is ignored for document windows. If you want to do this you have to subclass NSWindowController and override the -windowTitleForDocumentDisplayName: method. Apple should probably document this right under NSWindow's -setTitle: info...