Re: searching info, doc, examples for OS X cocoa app
Re: searching info, doc, examples for OS X cocoa app
- Subject: Re: searching info, doc, examples for OS X cocoa app
- From: kristin <email@hidden>
- Date: Thu, 3 May 2001 14:32:41 -0700
On Thursday, May 3, 2001, at 12:16 PM, Denis Gauthier wrote:
>
>
p.s.: we are searching the way to remember the position of the window
>
in the screen too (to keep it in a "preference" so when the app run
>
again, the window will be place at the same place when we shut down the
>
app)
You can use -[NSWindow setFrameAutosaveName:] if you want the window
position to be saved automatically. Here's the description (from
NSWindow.html) :
- (BOOL)setFrameAutosaveName:(NSString *)name
Sets the name used to automatically save the receiver's frame rectangle
in the defaults system to name. If name isn't the empty string (@""),
the receiver's frame is saved as a user default (as described in
saveFrameUsingName:) each time the frame changes. Returns YES if the
name is set successfully, NO if it's being used as an autosave name by
another NSWindow in the application (in which case the receiver's old
name remains in effect).