• 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: Cocoa Bindings and textField end-editing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa Bindings and textField end-editing


  • Subject: Re: Cocoa Bindings and textField end-editing
  • From: mmalcolm crawford <email@hidden>
  • Date: Mon, 19 Apr 2004 16:27:17 -0700

On Apr 19, 2004, at 4:11 PM, Dan Grassi wrote:

I have been trying Cocoa Bindings on a prototype and have run into a stumbling block. I have a dialog with NSTextFields and an OK button. I am using an NSObjectController to populate the fields and that works fine. The problem is when entering data and hitting the OK button. The value from the last field is not put into the content class so I miss that value. It I click on another field (if there is one) and/or hit the Return key all works fine.
Obviously what I want is for the last field that is still selected to be put into the content class. Am I missing something or is that a bug?

You're probably missing the NSEditor protocol:
<http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/ObjC_classic/Protocols/NSEditor.html>

Send your controller a commitEditing
(<http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/ObjC_classic/Classes/NSController.html>)
message prior to closing the dialogue window.

mmalc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Cocoa Bindings and textField end-editing (From: Dan Grassi <email@hidden>)

  • Prev by Date: Re: accessing newly-created files
  • Next by Date: Re: Cocoa Bindings and textField end-editing
  • Previous by thread: Cocoa Bindings and textField end-editing
  • Next by thread: Re: Cocoa Bindings and textField end-editing
  • Index(es):
    • Date
    • Thread