How to add data from an NSTextField to a Core Data

2019-02-15 15:19发布

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 NSTextField behaviour?

1条回答
Anthone
2楼-- · 2019-02-15 16:01

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

查看更多
登录 后发表回答