Re: NSBeginAlertSheet (II)
Re: NSBeginAlertSheet (II)
- Subject: Re: NSBeginAlertSheet (II)
- From: mark <email@hidden>
- Date: Mon, 20 Dec 2004 16:00:33 -0800
If I understood the api docs correctly, passing nil should mean to use the
default text ("OK" for English). I did try the explicit @"OK", but that
didn't change anything--still no window comes up
mark
> From: Matt Jaffa <email@hidden>
> Date: Mon, 20 Dec 2004 16:20:16 -0700
> To: Mark Dawson <email@hidden>
> Cc: email@hidden
> Subject: Re: NSBeginAlertSheet (II)
>
> 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