我有一個NSTextField
,調用resultsView
,我想用字符串graphical_availability
填充。設置Objective-C中的textField的值
我已經試過如下:
[resultsView setValue:graphical_availability];
,但保持在運行期間得到一個錯誤:
2012-08-13 08:39:08.468 App-Name[75231:6003] -[NSTextField setValue:]: unrecognized selector sent to instance 0x100509730
2012-08-13 08:39:08.470 App-Name[75231:6003] An uncaught exception was raised
2012-08-13 08:39:08.470 App-Name[75231:6003] -[NSTextField setValue:]: unrecognized selector sent to instance 0x100509730
所以,很顯然setValue
不被視爲對NSTextField
類的方法,我正在使用。我是Objective-C的新手(很明顯),並且很難在蘋果的文檔中找到它。
如何設置此文本字段的值?
謝謝!