• 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
Validating the contents of an accessory view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Validating the contents of an accessory view


  • Subject: Validating the contents of an accessory view
  • From: Jon Steinmetz <email@hidden>
  • Date: Tue, 25 Oct 2005 16:21:06 -0500

So if one has an accessory view in a save dialog or sheet and that accessory view has an edit field, how does one validate the contents of that edit field? Ideally there would be a message sent which would give the NSTextField the opportunity to check its contents and reject the dismissal of the dialog if the contents were invalid.

My specific case is that I have an NSTextField in an accessory view in an NSSavePanel. I want to validate the contents of the edit field before the user can dismiss the panel.

I have tried overriding resignFirstResponder on the NSTextField but it never gets called when the dialog is dismissed. I have tried to override commitEditing on the NSTextField but it also does not get called. I already have delegate methods for textShouldEndEditing: but that also does not get called.

This seems like something that should have an easy solution but I am not finding it. Does anybody have a solution to this?

Thanks

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Follow-Ups:
    • Re: Validating the contents of an accessory view
      • From: Nick Zitzmann <email@hidden>
References: 
 >NSTextField or NSTextView with fixed baseline (From: Jon Steinmetz <email@hidden>)
 >Re: NSTextField or NSTextView with fixed baseline (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Re: NSTextField or NSTextView with fixed baseline
  • Next by Date: Re: Validating the contents of an accessory view
  • Previous by thread: Re: NSTextField or NSTextView with fixed baseline
  • Next by thread: Re: Validating the contents of an accessory view
  • Index(es):
    • Date
    • Thread