开发者

How to add data from an NSTextField to a Core Data Attribute without having to press Return or Tab after editing the TextField?

开发者 https://www.devze.com 2023-01-02 16:48 出处:网络
I use a sheet with 3 NSTextFields and a Cancel- and OK-Button to edit the attributes of a Core Data Entity.

I use a sheet with 3 NSTextFields and a Cancel- and OK-Button to edit the attributes of a Core Data Entity. The text entered in the NSTextFields is only updated in the Core Data Entity if i press Tab or Return after writing in the NSTextField or if i focus another NSTextField with the mouse. If i just enter text in an NSTextField and press the OK-Button the entered text is lost.

Is there some attribute i can set in Interface Builder to change this N开发者_如何学PythonSTextField behaviour?


The answer in my case is to check the “continuously updates value” option in the NSTextField’s value binding. For other answers to the same problem see: Red Sweater Blog — Stay Responsive: http://www.red-sweater.com/blog/229/stay-responsive

0

精彩评论

暂无评论...
验证码 换一张
取 消