Re: NSWindow Frame (auto) save
Re: NSWindow Frame (auto) save
- Subject: Re: NSWindow Frame (auto) save
- From: Pete Yandell <email@hidden>
- Date: Sat, 27 Mar 2004 21:59:18 +1100
In your awakeFromNib just do:
if (![myWindow setFrameUsingName:@"myFrameName"]) [myWindow center];
This works happily with the auto save name set for the window in
interface builder.
Pete Yandell
http://pete.yandell.com/
On 27/03/2004, at 8:39 PM, Marten van Gelderen wrote:
>
Hello,
>
>
Is there an elegant way, other than hard looking in the userDefaults
>
for the existence of a key: @"NSWindow Frame <some window name>" to
>
see if the window frame has ever been saved before? I would like to
>
center the window if it comes up first out of a clean install of my
>
app and later comply to user movements of the window.
>
>
I now have #define-d a NSString that has the "NSWindow Frame <my
>
window_name>" hard coded into the string.
>
--
>
Groeten, Marten
>
_______________________________________________
>
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.
_______________________________________________
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.