-3

I want to access the text variable of NSTextField ?

I'v tried this. But it's not working.

name = textfield.text

Error: "Value of type 'NSTextField' has no member 'text'"

rmaddy
  • 314,917
  • 42
  • 532
  • 579

1 Answers1

2

Are you confusing it with UITextField on iOS? The corresponding property on Mac OS X is stringValue

name = textfield.stringValue
Code Different
  • 90,614
  • 16
  • 144
  • 163