Re: Modal NSWindow
Re: Modal NSWindow
- Subject: Re: Modal NSWindow
- From: Luc Vandal <email@hidden>
- Date: Thu, 10 Mar 2005 22:17:26 -0500
Hi!
I managed to display the window, but how come if I click on the Ok
button (which is equivalent to Return) or the Cancel button (equiv to
Escape), the buttons are highlighted but the window does not close?
Thanks!
On 10-Mar-05, at 9:26 PM, Luc Vandal wrote:
Yeah I got that part covered now! The only problem I have so far is
that the pointer to the window remains null. I added an outlet to my
controller class for that window but it's not being initialized or
something. Perhaps I did something wrong in IB?
Thanks!
On 10-Mar-05, at 9:15 PM, Justin Spahr-Summers wrote:
<http://developer.apple.com/documentation/Cocoa/Reference/
ApplicationKit/ObjC_classic/Classes/NSApplication.html>
runModalForWindow:
- (int)runModalForWindow:(NSWindow *)aWindow
Starts a modal event loop for aWindow. Until the loop is broken by a
stopModal, stopModalWithCode:, or abortModal message, the application
won't respond to any mouse, keyboard, or window-close events unless
they're associated with aWindow. If stopModalWithCode: is used to stop
the modal event loop, this method returns the argument passed to
stopModalWithCode:. If stopModal is used, it returns the constant
NSRunStoppedResponse. If abortModal is used, it returns the constant
NSRunAbortedResponse. This method is functionally similar to the
following:
[code here]
The window aWindow is placed on the screen using NSWindow's center
method, if not already visible, and made key as a result of the
runModalForWindow message. Do not send NSWindow's
makeKeyAndOrderFront: to aWindow.
On Thu, 10 Mar 2005 20:57:27 -0500, Luc Vandal <email@hidden>
wrote:
Hi!
can anyone show me how to display a modal NSWindow? I don't know what
has to be done to initialize the window and to display it. By the
way,
the window is in the main nib file.
Thanks!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden