If you want to retrieve the data a user typed in on a Cocoa Mac application, follow the following steps.
1. You first need to declare a NSTextField variable in .h file

@interface SampleAppDelegate : NSObject {
NSTextField *myText;
@property (retain) IBOutlet NSTextField *myText;

2. Then you need to synthesize it for properties in .m file

@synthesize myText;

3. Connect myText with the interface
4. For getting data from this ‘myText’ use the following code



Leave a Reply

Your email address will not be published. Required fields are marked *




Theme by HermesThemes

Copyright © 2018 CoderzHeaven. All Rights Reserved

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.