• 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: Window Titles In Document-Based Applications
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Window Titles In Document-Based Applications


  • Subject: Re: Window Titles In Document-Based Applications
  • From: Don Arbow <email@hidden>
  • Date: Mon, 3 Mar 2003 16:47:22 -0800

On Monday, March 3, 2003, at 03:10 PM, Eric Czarny wrote:

I have decided to go with a document-based architecture for my blogging client and there are a few questions that I have. The main question I have has to deal with the window titles displayed when a new document is created. I would like to replace "Untitled" and "Untitled 2" with just the string "New Entry...". I currently am able to use setTitle: to change the name of the window title to the subject of the user's entry, but I would like to be able to replace > "Untitled".

The second question I have is a rather general one which really all I need is clarification on. I have been reading into the method addWindowController: in an NSDocument subclass and am wondering how this method can be used and what it exactly does. Do it enable you to create multiple instances of a given window controller to correspond with a given document? Or does it let you use your own window controllers to replace the one used by documents? I can't seem to find any information on this, any help for either question would be a huge help! thanks!

Eric,

Use the windowTitleForDocumentDisplayName method in your window controller. You get passed a displayName parameter, which you can use to build your window title (or ignore it altogether).

And since you have to subclass NSWindowController in order to add that method, that answers question #2.

Don


The fix is temporary, unless it works
- Red Green
_______________________________________________
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: 
 >Window Titles In Document-Based Applications (From: Eric Czarny <email@hidden>)

  • Prev by Date: Cocoa/IB Question
  • Next by Date: Re: Georg looks at that Georg! ;-)
  • Previous by thread: Window Titles In Document-Based Applications
  • Next by thread: Drawing Directly to the Screen
  • Index(es):
    • Date
    • Thread