views:

46

answers:

2

I'm just getting started with Objective-C and I'm writing a simple application.

I made two outlets :

  • wnd - main window
  • display - the text box

Then I've tried using this code:

[wnd setTitle:[display value]];

Unfortuanately it didn't work ...

The debugger said :

2010-05-22 XX:XX:08.577 HelloWorld[2536:a0f] -[NSTextField value]: unrecognized selector sent to instance 0x102e032a0

Does anyone know how to get it to work?

+2  A: 

Not my forte, but try stringValue instead of value.

Marcelo Cantos
+1  A: 

NSTextFiled does not have a method value - try stringValue. See NSControl the superclass of NSTextField

Mark