Re: Saving a borderless window frame to user defaults
Re: Saving a borderless window frame to user defaults
- Subject: Re: Saving a borderless window frame to user defaults
- From: Matt Neuburg <email@hidden>
- Date: Sat, 30 Jun 2007 08:51:24 -0700
- Thread-topic: Saving a borderless window frame to user defaults
On Thu, 28 Jun 2007 13:27:55 -0400, Hank Heijink <email@hidden>
said:
>Hi all,
>
>I have a borderless window (adapted from Apple's borderless window
>example) that I want to save the window frame of in the user
>defaults. I've given it an auto save name in Interface Builder, and
>that works fine except for one thing: it saves the origin of the
>window frame rectangle, but it doesn't keep the size. I've been
>experimenting, and it turns out that the correct rectangle is saved
>to the user defaults, but somehow the size gets overridden by the
>size set in interface builder somewhere between calling -
>initWithContent:etc.etc. and the actual drawing of the window.
So it *does* keep the size. The window frame is correctly written into the
defaults. The problem is merely that when you start up the application the
next time, that window frame is not being applied to the window. Is that
correct? If so, it should be possible to fetch the window frame information
out of the defaults and then apply it to the window yourself, as the
application starts up. Could that work?
m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
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