krb
krb

Reputation: 16345

Change window title to the one in text box in Objective-C?

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

I made two outlets :

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?

Upvotes: 0

Views: 480

Answers (2)

mmmmmm
mmmmmm

Reputation: 32710

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

Upvotes: 1

Marcelo Cantos
Marcelo Cantos

Reputation: 186068

Not my forte, but try stringValue instead of value.

Upvotes: 2

Related Questions