Re: What Size My Window?
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