Re: NSWindow setTitle not affecting displayed title
Re: NSWindow setTitle not affecting displayed title
- Subject: Re: NSWindow setTitle not affecting displayed title
- From: Keith Renz <email@hidden>
- Date: Thu, 10 Mar 2005 09:34:21 -0500
- Resent-date: Thu, 10 Mar 2005 09:34:50 -0500
- Resent-from: Keith Renz <email@hidden>
- Resent-message-id: <email@hidden>
- Resent-to: Cocoa-Dev List <email@hidden>
On Mar 10, 2005, at 12:48 AM, Andrew White wrote:
Saw them. Basically, I want my windows to ignore the document's
displayName and just use the title I tell them to.
Since your app is document-based, setting the window title directly
won't work.
I suppose I could override windowTitleForDocumentDisplayName:
displayName and ignore the displayName parameter.
Overriding -windowTitleForDocumentDisplayName: will use whatever string
you return for the window's title. Keep in mind that the displayName
parameter is the name of the document's file (if already saved) or the
name which will appear in the save sheet, not the string you return.
The displayName parameter is identical to the document's (NSDocument)
-displayName. If you want to modify the file's proposed file name, you
can override NSDocument -displayName. In your case, overriding
-windowTitleForDocumentDisplayName: should work fine for modifying the
window's title, but it will not affect the file name. The file name
will still be "Untitled n".
Keith
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden