• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTextField question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextField question


  • Subject: Re: NSTextField question
  • From: Stéphane Sudre <email@hidden>
  • Date: Mon, 8 Sep 2003 12:31:47 +0200

wouldn't you have a NSDateFormatter attached to your NSTextField?

On lundi, sep 8, 2003, at 09:19 Europe/Paris, James Barkey wrote:

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.
_______________________________________________
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.

  • Follow-Ups:
    • Re: NSTextField question
      • From: James Barkey <email@hidden>
References: 
 >NSTextField question (From: James Barkey <email@hidden>)

  • Prev by Date: Re: Techniques for thread communication
  • Next by Date: Re: NSTextField question
  • Previous by thread: NSTextField question
  • Next by thread: Re: NSTextField question
  • Index(es):
    • Date
    • Thread