Re: controlling "SAVE" button in NSSavePanel
Re: controlling "SAVE" button in NSSavePanel
- Subject: Re: controlling "SAVE" button in NSSavePanel
- From: Stephane Sudre <email@hidden>
- Date: Fri, 28 Apr 2006 17:56:04 +0200
On 28 avr. 06, at 16:46, Kirk Kerekes wrote:
I have an accessoryView in an NSSavePanel that gathers essential
information (a passphrase) from the user for which there can be no
valid default. I would like to disable the OK (save) button in the
NSSavePanel until the passphrase is provided. While NSSavePanel
provides a number of validation delegate methods, none of these
actually disable the button -- the panel leaves it enabled, and just
ignores it if validation fails. This would seem to be atrocious UI
design.
While I have some hacky approaches available, I am hoping that someone
has some wisdom to shed on this -- a genuinely robust method that
anticipates future changes to NSSavePanel.
Maybe a stupid idea could be to:
1. Write a category for NSSavePanel so that you have an accessor to the
OK Button ivar
NSButton * _okButton;
2. Disable/Enable it when needed
Running a class-dump on the AppKit may provide other tracks.
_______________________________________________
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