I've got an issue where I would severely love to control the stringValue of a textfield by calling them with strings. I have read over the documentation now, and as far as I can read, I am doing things correctly...
example:
data.h
In both of the methods here I've got the code functioning to properly use a string value that is passed or returned, this much I have checked...
My issue comes down to this part... in my controller.m I've got an instance of data as myData, attempting something like this
I cannot figure out a way to get the textField to actually change its data taht it is showing to the screen..
I would prefer to do it this way, because I want to take the large amount of textfield's in data.h, and write one function that I can pass variables to that will correctly adjust the visible information.
Any thoughts / suggestions / other ways of doing this, would be greatly appreciated...
example:
data.h
Code:
#interface data : NSObject {
IBOutlet NSTextField *txtField1;
}
-(void)setTxtField1:(NSString *) aString;
-(NSString *) txtField;
@end
In both of the methods here I've got the code functioning to properly use a string value that is passed or returned, this much I have checked...
My issue comes down to this part... in my controller.m I've got an instance of data as myData, attempting something like this
Code:
[myData setValue:@"a value" forKey:@"txtField"];
I would prefer to do it this way, because I want to take the large amount of textfield's in data.h, and write one function that I can pass variables to that will correctly adjust the visible information.
Any thoughts / suggestions / other ways of doing this, would be greatly appreciated...