I've been trying to understand the GUI of Xcode, and Interface builder along w/ learning C. I've made good progress learning, things are clicking here and there but I don't understand the standard methods for a class.
Example
I have added an NSTextView object to my .nib file, then added an NSTextField as well. I also added 2 push buttons (NSButton) and linked them up to display text when clicking on the button. But it to display text I could not use the same method.
On the NSTextView I had to use [textView setString: @"Hello World"];
On the NSTextField I had to use ..
[words setStringValue"Hello, World"];
[words setNeedsDisplay:YES];
How can I find out with out searching the internet how to accomplish stuff like this. From working with Visual Basic, I would just type txtField. (and after I typed . it would bring up a list and I would chose settext=) so it showed me all the associated methods with the txtField class. Is there a way for me to find this info out in Xcode?
Thanks!
Jason
just for reference here are my files
.h
#import <Cocoa/Cocoa.h>
@interface AppController : NSObject {
IBOutlet id textView;
IBOutlet NSTextField *words;
}
- (IBAction) clearText: sender;
- (IBAction) sayHello: (id)sender;
@end
********************
.m
#import "AppController.h"
@implementation AppController
- (IBAction) clearText: sender
{
[textView setString: @"Hello World "];
}
- (IBAction)sayHelloid)sender{
[words setStringValue"Hello, World"];
[words setNeedsDisplay:YES];
}
@end
Example
I have added an NSTextView object to my .nib file, then added an NSTextField as well. I also added 2 push buttons (NSButton) and linked them up to display text when clicking on the button. But it to display text I could not use the same method.
On the NSTextView I had to use [textView setString: @"Hello World"];
On the NSTextField I had to use ..
[words setStringValue"Hello, World"];
[words setNeedsDisplay:YES];
How can I find out with out searching the internet how to accomplish stuff like this. From working with Visual Basic, I would just type txtField. (and after I typed . it would bring up a list and I would chose settext=) so it showed me all the associated methods with the txtField class. Is there a way for me to find this info out in Xcode?
Thanks!
Jason
just for reference here are my files
.h
#import <Cocoa/Cocoa.h>
@interface AppController : NSObject {
IBOutlet id textView;
IBOutlet NSTextField *words;
}
- (IBAction) clearText: sender;
- (IBAction) sayHello: (id)sender;
@end
********************
.m
#import "AppController.h"
@implementation AppController
- (IBAction) clearText: sender
{
[textView setString: @"Hello World "];
}
- (IBAction)sayHelloid)sender{
[words setStringValue"Hello, World"];
[words setNeedsDisplay:YES];
}
@end