• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: extending NSSavePanel, how to disable <save> button?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: extending NSSavePanel, how to disable <save> button?
      • From: Mike Abdullah <email@hidden>
References: 
 >extending NSSavePanel, how to disable <save> button? (From: Eric Slosser <email@hidden>)

  • Prev by Date: Re: GC pros and cons
  • Next by Date: Re: GC pros and cons
  • Previous by thread: extending NSSavePanel, how to disable <save> button?
  • Next by thread: Re: extending NSSavePanel, how to disable <save> button?
  • Index(es):
    • Date
    • Thread