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

蹲街弑〆低调 提交于 2019-11-30 20:11:55

问题


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:


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



来源:https://stackoverflow.com/questions/2984064/how-to-add-data-from-an-nstextfield-to-a-core-data-attribute-without-having-to-p

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!