I have a button that correctly wired such that when it is clicked, the ‘login’ IBAction is hit.
- (IBAction) login: (id)sender { NSLog(@'OK'); }
Now, I wired the button to the username/password text fields using ‘takeStringValueFrom’ but I don’t understand how to then get at those values?
Hope that makes sense.
EDIT: so basically, when i click the ‘login’ button the above event fires. I’d like to grab the values from two text boxes on that same window, what is the best way to accomplish this? I suppose I could use IBOutlet for each of the text boxes … is this the correct way?
Re-reading the doc, it’s possible ‘takeStringValueFrom’ isn’t what i thought it was.
You want to declare your username and password textfields as
IBOutlets, and then hook them up in Interface Builder. Then, in yourloginhandler, you use thestringValuemessage to extract their values: