• 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: What Size My Window?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What Size My Window?


  • Subject: Re: What Size My Window?
  • From: Ken Thomases <email@hidden>
  • Date: Thu, 4 Sep 2008 03:48:36 -0500

On Sep 4, 2008, at 3:10 AM, Gerriet M. Denkmann wrote:

For an ordinary window one can set in IB "Auto Save Name:" and everything works as expected. I can give it a nice size and position and the next time I open it, all is fine.

But if this window is a document, controlled by some NSDocumentController, this Auto Save Name seems to be ingnored (at least on Tiger).
This is annoying, as it forces me to size each new window again and again.

This is a bug in NSWindowController that's fixed in Leopard. Search for "New Behavior for NSWindowController Frame Autosave Names" in the Leopard AppKit release notes <http://developer.apple.com/releasenotes/Cocoa/AppKit.html >.


You can work around it using -[NSWindowController setWindowFrameAutosaveName:].

Alternatively, you can use a custom subclass of NSWindowController that fixes the bug. It can override -setWindow: to first capture any existing frame auto-save name, then invoke super, then restore the original frame auto-save name if it exists, is non-empty, and if the window's frame auto-save name was in fact cleared by super's implementation.

Cheers,
Ken

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: What Size My Window?
      • From: "Gerriet M. Denkmann" <email@hidden>
References: 
 >What Size My Window? (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Re: Why do all these methods of measuring string metrics with font attribute fail?
  • Next by Date: Re: What Size My Window?
  • Previous by thread: What Size My Window?
  • Next by thread: Re: What Size My Window?
  • Index(es):
    • Date
    • Thread