Re: set/saveFrameUsingName
Re: set/saveFrameUsingName
- Subject: Re: set/saveFrameUsingName
- From: Jeremy Dronfield <email@hidden>
- Date: Thu, 4 Jul 2002 23:00:11 +0100
Thanks. I tried some of the workarounds (the ones that seemed suitable)
and also did some experiments. I found that using
-setWindowFrameAutosaveName: instead of -setFrameAutosaveName: in
-awakeFromNib overcame the problem, but only partially. It works only so
long as the right hand edge of the window doesn't come closer than about
an inch (about 50-80 pixels) to the right hand edge of the screen. Since
this bug doesn't seem to affect Apple's own Cocoa apps (e.g. the
Activity Viewer in Mail, which I'm looking at right now), I don't
understand why it's affecting mine.
-Jeremy.
On Thursday, July 4, 2002, at 09:09 pm, Nicholas Riley wrote:
On Thu, Jul 04, 2002 at 09:00:37PM +0100, Jeremy Dronfield wrote:
The documentation for windows & panels says:
An NSWindow can store its placement in the user defaults system, so
that
it appears in the same location the next time the user starts the
application. The saveFrameUsingName: method stores the frame rectangle,
and setFrameUsingName: sets it from the value in user defaults.
Not in my application it doesn't. I can get it to save and set the SIZE
of a window, but not its placement on screen. When I quit and relaunch
and open the window, it appears with its saved size, but in its default
location in the top left of the screen. I've checked that the frame
isn't locked in IB, and I've tried it with both springy and straight
'wires'. Is this a bug?
Yup. I spent several hours figuring this out, some workarounds are on
this page:
<http://www.cocoadev.com/index.pl?NSWindowFrameAutosizing>
--
=Nicholas Riley <email@hidden> |
<http://www.uiuc.edu/ph/www/njriley>
Pablo Research Group, Department of Computer Science and
Medical Scholars Program, University of Illinois at Urbana-Champaign
_______________________________________________
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.