I’ve got an NSTextField called resultsView that I’d like to populate with the string graphical_availability.
I’ve tried the following:
[resultsView setValue:graphical_availability];
but keep getting an error during runtime:
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
So, obviously setValue isn’t recognized as a method on the NSTextField class that I’m using. I’m new to Objective-C (obviously) and have had trouble finding it on Apple’s docs.
How can I set the value of this textField?
Thank you!
setStringValue:is the method you need.From the NSTextField class reference: