I’m trying to get a value from an object in my mac application.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
NSControl, of whichNSTextFieldis a subclass, has a methodintValue, which gets you what you want. Set up an outlet in your controller and use Interface Builder to hook it up to the text field you care about. After that, your controller can just access it like:The outlet declaration would look something like:
Along with your controller’s other instance variables.