• 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: controlling "SAVE" button in NSSavePanel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >controlling "SAVE" button in NSSavePanel (From: Kirk Kerekes <email@hidden>)

  • Prev by Date: Re: Document still modified after last Undo
  • Next by Date: Re: Best Place To Save States
  • Previous by thread: controlling "SAVE" button in NSSavePanel
  • Next by thread: What kind of network protocol used by "Shared Printer/Fax"
  • Index(es):
    • Date
    • Thread