What is the easiest way to get my customized NSAlert to allow multiple
key equivalents for its buttons?
For instance, I'd like to assign not just the default Command-D to
Don't Save, but also another key with which my users are very
familiar.
I think it might be possibly to replace the
On Wed, Oct 7, 2009 at 10:58 AM, David Reitter david.reit...@gmail.com wrote:
What is the easiest way to get my customized NSAlert to allow multiple key
equivalents for its buttons?
You're probably going to need to stop using NSAlert and start using
your own window as a sheet. Then you should
On Oct 7, 2009, at 10:58 AM, David Reitter wrote:
What is the easiest way to get my customized NSAlert to allow
multiple key equivalents for its buttons?
I think the best way is to create your own alert panel in a nib and
run it modally. That way you have total control — you can set your
On Oct 7, 2009, at 2:09 PM, Jens Alfke wrote:
I think the best way is to create your own alert panel in a nib and
run it modally. That way you have total control — you can set your
own window delegate to handle key events, for example.
I had a similar solution beforehand but gave up on it
On Wed, Oct 7, 2009 at 11:19 AM, David Reitter david.reit...@gmail.com wrote:
window = (MyNSAlert*) [window clone];
What is this -clone method?
That way I could get NSAlert to do all the layout and prepare the window,
but then take over and roll my own?
No, because even granting the
On Oct 7, 2009, at 2:48 PM, Kyle Sluder wrote:
On Wed, Oct 7, 2009 at 11:19 AM, David Reitter david.reit...@gmail.com
wrote:
window = (MyNSAlert*) [window clone];
What is this -clone method?
I meant NSObject's -copy. Confused it with Java's clone method.
That way I could get NSAlert to
On Wed, Oct 7, 2009 at 12:01 PM, David Reitter david.reit...@gmail.com wrote:
I meant NSObject's -copy. Confused it with Java's clone method.
NSWindow doesn't conform to NSCopying anyway, so -copy will just raise
an exception because there is no suitable implementation of
-copyWithZone:.
On Oct 7, 2009, at 3:12 PM, Kyle Sluder wrote:
FWIW, the alerts are run with beginModalSessionForWindow and
runModalSession.
So I don't understand why you're so intent on using NSAlert if you're
not using its -beginSheetModalForWindow:… convenience method?
Oh, I use it. But because of the