• 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
Re: Newbie - Setting a window to a title other then document file name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie - Setting a window to a title other then document file name


  • Subject: Re: Newbie - Setting a window to a title other then document file name
  • From: Bruno Gaufier <email@hidden>
  • Date: Thu, 18 Sep 2003 20:42:49 +0200

Hello,

On Wednesday, September 17, 2003, at 11:25 PM, Tom Gray wrote:

I have a NSWindowController subclass whose window I would like to set
to a title other then the filename used by the NSDocument subclass. I
have tried:

[self windowTitleForDocumentDisplayName:@"Crewdog Terminal"];
try overriding the cocoa method in you NSWindowController subclass.

- (NSString *)windowTitleForDocumentDisplayName:(NSString *)displayName {
if (![[self document] fileName])
// The document is somewhere on disk
return @"Whatever you want when doc on disk";
else
// The document has not been saved
return @"Whatever you want when doc not on disk";
}

Warning : i didn't check the above code's syntax because syntax checking does not work in mail...

--
Bruno Gaufier
----
email@hidden
email@hidden

http://perso.club-internet.fr/bgaufier/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Newbie - Setting a window to a title other then document file name (From: Tom Gray <email@hidden>)

  • Prev by Date: Async AppleScript Commands
  • Next by Date: Apple nice web pages: how to do?
  • Previous by thread: Re: Newbie - Setting a window to a title other then document file name
  • Next by thread: NSAutoreleasePool question
  • Index(es):
    • Date
    • Thread