NSTextField question
NSTextField question
- Subject: NSTextField question
- From: James Barkey <email@hidden>
- Date: Mon, 8 Sep 2003 16:19:50 +0900
I am new to Cocoa programming and have been experimenting with some
NSControls. I made a simple UI with IB which included two buttons and
an NSTextField. I've made the necessary connections, and all works as
expected as long as the NSTextField is not Selectable. If I do make it
selectable, and than click on it, my NSTextField no longer accepts
setStringValue:@"...", the field just goes blank when the associated
button is clicked. Interestingly, if I uncomment [dateText
setObjectValue:[NSCalendarDate date]]; that works fine, and shows up in
the text field. I am probably missing something simple, but it sure is
puzzling me. Thank you.
James
#import "FormatController.h"
@implementation FormatController
- (void)awakeFromNib
{
[textField setObjectValue:[NSCalendarDate date]];
}
- (IBAction)refreshButtonPushed:(id)sender
{
[textField setObjectValue:[NSCalendarDate date]];
}
- (IBAction)textButtonPushed:(id)sender
{
[textField setStringValue:@"Text button pushed"];
//[textField setObjectValue:[NSCalendarDate date]];
}
@end
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.