Re: Discovering Openstep Tutorial (missing code)
Re: Discovering Openstep Tutorial (missing code)
- Subject: Re: Discovering Openstep Tutorial (missing code)
- From: Art Isbell <email@hidden>
- Date: Thu, 26 Jul 2001 13:01:04 -1000
On Thursday, July 26, 2001, at 12:22 PM, Ronaldo Nascimento wrote:
1) How do you load another nib file from your project that has a modal
panel
The nib can be just like any other nib.
3) How to you pass control to it so it handles all events until it is
closed
After loading the nib, send NSApp (your NSApplication object)
runModalForWindow: with the window loaded from the nib as the argument.
See NSApplication's runModalForWindow: method description for info about
how to end the modal session.
2) How do you putinformation into the panel
4) How do you get the information from the panel
Just as you would for any other window. NSApplication handles the
modal session for you.
The example you used where the showInspector: code was missing
probably isn't a good place to use a modal window. If you look at
inspectors in Cocoa apps delivered with OS X, they aren't typically
modal windows.
I (and presumably most end users) hate being blocked from doing
something reasonable because a modal window is open. Windows apps are
notorious for this. Please don't design OS X apps to block reasonable
user access by making windows modal when they don't absolutely have to
be.
Art Isbell
Apple iServices Technical Support
http://www.apple.com/iservices/webobjectssupport/
+1-808-591-0836