Re: Show / Hide Window
Re: Show / Hide Window
- Subject: Re: Show / Hide Window
- From: Sherm Pendley <email@hidden>
- Date: Fri, 18 Apr 2003 06:00:09 -0400
On Friday, April 18, 2003, at 01:07 AM, David Blanton wrote:
When the user chooses Preferences I display a preference panel. How
do I
hide the main window,
I'm not sure that you should - most apps don't, and consistency is a
Good Thing.
But anyway, have a look at NSWindow's orderOut: method - it should do
what you want.
how do I know when the preference panel is dismissed
I assume you're not closing it yourself - if you were, you'd know. ;-)
Two possibilities come to mind: You could define the windowWillClose:
method in the panel's delegate, or register something to receive
NSWindowWillCloseNotification, passing the panel as the notifying object.
(close or esc does it) and then how do I show the main window?
There are a variety of methods you could potentially use - check out the
"Ordering windows" and "Making key and main windows" sections of the
NSWindow docs. The most likely candidate is makeKeyAndOrderFront:.
sherm--
C programmers never die - they're just cast into void.
_______________________________________________
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.