Re: What is the best way?
Re: What is the best way?
- Subject: Re: What is the best way?
- From: Scott Ribe <email@hidden>
- Date: Mon, 14 Jul 2008 14:07:45 -0600
- Thread-topic: What is the best way?
> Thats correct. The main window is not covered up. The second window is not
> modal I agree. In the second window I just need to collect some additional
> info that will go the the second's window controller. There will be OK and
> Cancel buttons on that window to close it. The main window will not change
> after.
>
OK, so I think the bits you are looking for are:
- the screen method of NSWindow to find what screen your main window is on
- the visibleFrame method of NSScreen to get the bounds of that screen, less
the menu bar and dock
- the frame method of NSWindow to get the location of your main window
- the setFrame:display: method of NSWindow to adjust the locations of your
main & settings windows so they don't overlap
You may also want to look at the awakeFromNib method in your controller,
because that's a good point to do all this, the window size and location
will be set from the nib, but it won't be displayed yet, and you can
position it there, and it will be displayed at the location you set with any
visible blink or move.
Personally, I would consider displaying the settings window as a sheet on
the main window, and require the user to choose the settings before
proceeding--unless you think the user needs to see the main window while
making the settings...
--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice
_______________________________________________
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