Re: NSBeginAlertSheet (II)
Re: NSBeginAlertSheet (II)
- Subject: Re: NSBeginAlertSheet (II)
- From: Matt Jaffa <email@hidden>
- Date: Mon, 20 Dec 2004 16:20:16 -0700
Mark,
Looks like you are passing in nil for where the OK button is.
I don't know if this is what is causing the problem, but try this:
NSBeginAlertSheet(errorMsg,
@"Ok", // use OK button <------- I think you need to specify
the label
nil, nil, // no other buttons
[self window], // get controller's window
self, // we'll be our own delegate
nil, // no did-end selector
nil, // no did-dismiss selector
// @selector(emptyAlertDidEnd:returnCode:contextInfo:), // empty
did-dismiss selector needed
nil, // no context info
nil, // no extra message
nil // no parameters in message
);
Matt
On Dec 20, 2004, at 4:02 PM, Mark Dawson wrote:
I'm having even more problems using NSBeginAlertSheet. I don't get
any sheet coming up. If I use NSAlert, everything works; however, I
do need to run from 10.2, so that isn't a general solution. Note that
I've tried using and not using a did-dismiss selector (empty).
Further note: the routine is a category of NSWindowController (I don't
seem to be able to use windowForSheet, as I get an error stating that
it may not be part of NSWindowController)…
What could I be doing wrong?
NSBeginAlertSheet(errorMsg, nil, // use OK button
nil, nil, // no other buttons
[self window], // get controller's window
self, // we'll be our own delegate
nil, // no did-end selector
nil, // no did-dismiss selector
// @selector(emptyAlertDidEnd:returnCode:contextInfo:), // empty
did-dismiss selector needed
nil, // no context info
nil, // no extra message
nil // no parameters in message
);
_______________________________________________
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