Issue with NSWindow -save/-setFrameUsingName:
Issue with NSWindow -save/-setFrameUsingName:
- Subject: Issue with NSWindow -save/-setFrameUsingName:
- From: "Dr. Rolf Jansen" <email@hidden>
- Date: Sat, 7 Jul 2007 12:59:14 -0300
Hi,
I make use of NSWindows -save/-setFrameUsingName: method combination,
in order to save window positions of my utility program.
Als long as the main screen does not change, everything works fine.
However, I use my PowerBook in the office, at home and on travel. In
the office, I use a 17" Apple-TFT-Display (1280 x 1024) as the main
screen, otherwise the (PB) main screen resolution is 1024 x 768.
The point is, when I change the main screen, then the window
positions are not kept the same, neither in relative coordinates from
the top-left, nor in absolute coordinates from the bottom-left.
My expectation would have been that the window postion is preserved
with respect to the top-left, since the information for doing the
necessary coordinate system recalculation is stored along with the
window position into the preferences file. I would have understood
from a mathematical point of view, if the position would have been
preserved from the bottom-left.
Possibly somebody can shed some light on the rationals on the current
situation where the windows are all the time offset vertically by
about +/-30 pixel once I change the main screen. Would it help to
implement my own methods based on the NSWindow -
stringWithSavedFrame:, or is already this method problematic, i.e.
gives the wrong coordinates?
BTW, I have also a big problem with Interface Builder, which is
somehow related. When I save the NIB files from different main screen
sizes, then I always need to readjust the window positions. Does
somebody know a good workaround also for this problem, other than to
take the 17" Display together with my PB all the time with me?
Many thanks for any advise
Best regards
Rolf Jansen
_______________________________________________
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