Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting NSTextField by tag number?

I've got a bunch of NSTextFields on a window (tagged 1-8) and I'm wondering if it's possible to access each individual text field programatically by its tag number so I can then get/set its value?

I'm a newbie and while I know how to access these fields by name, doing it by tag number will make things an awful lot simpler for what I'm trying to achieve in this particular instance.

Thanks a lot :-)

like image 969
Bender Avatar asked Jan 14 '10 07:01

Bender


1 Answers

the_fourth_textview = [the_superview_containing_all_textfields viewWithTag:4];
like image 168
kennytm Avatar answered Sep 30 '22 14:09

kennytm