Re: extending NSSavePanel, how to disable <save> button?
Re: extending NSSavePanel, how to disable <save> button?
- Subject: Re: extending NSSavePanel, how to disable <save> button?
- From: Steve Christensen <email@hidden>
- Date: Wed, 24 Jun 2009 10:52:35 -0700
I haven't tried myself, but just checking the headers it looks like
the closest thing would be to make your controlling class the
delegate and then implement either
- (BOOL)panel:(id)sender isValidFilename:(NSString *)filename;
or
- (NSString *)panel:(id)sender userEnteredFilename:(NSString *)
filename confirmed:(BOOL)okFlag;
since they control whether to allow the selection process to
complete. The docs for these methods have more details that might
help you decide which would be better.
steve
On Jun 24, 2009, at 10:42 AM, Eric Slosser wrote:
I'm extending NSSavePanel by using an accessory view. The view
contains two NSSecureTextFields, to contain the user-typed password
and confirmation.
I know how to detect when the two password fields don't have
identical content, to display a warning string on the dialog, and
to prevent the user from exiting the dialog.
But I'd also like to disable the <Save> button. Is it possible?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden