• 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: Continous updates from NSForm
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Continous updates from NSForm


  • Subject: Re: Continous updates from NSForm
  • From: Derrick Bass <email@hidden>
  • Date: Tue, 15 Nov 2005 22:58:52 -0800

On Nov 14, 2005, at 6:26 PM, I wrote:

I want to be able to update the enabled state of a button continuously as the user types in an NSForm. (I.e. when the data is valid, the "Okay" button is instantly enabled.) Is there a way to get NSForm to send its action on every keypress, paste, etc? Or is there another way to accomplish what I want to do?


Well, I still have no idea how to do this manually, but Cocoa Bindings can do it. I connected (or do I say "bound"?) the NSForm to keys in my model and connected the button to a method called questionAnswerValid and then put this in the initialize method:
[self setKeys:[NSArray arrayWithObjects:@"question",@"answer",nil]
triggerChangeNotificationsForDependentKey:@"questionAnswerValid"];


Derrick

_______________________________________________
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: 
 >Continous updates from NSForm (From: Derrick Bass <email@hidden>)

  • Prev by Date: .mailbundle question
  • Next by Date: Hard linked files cannot be modified
  • Previous by thread: Continous updates from NSForm
  • Next by thread: NSPopUpButton With Submenus
  • Index(es):
    • Date
    • Thread