Re: Cocoa Bindings and textField end-editing
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.