Re: NSDatePickerCell in an NSTableView
Re: NSDatePickerCell in an NSTableView
- Subject: Re: NSDatePickerCell in an NSTableView
- From: Troy Stephens <email@hidden>
- Date: Thu, 12 May 2005 13:15:26 -0700
On May 11, 2005, at 11:48 AM, Wil Turner wrote: Hi, I've been working with the new NSDatePicker UI element and have run into a small problem. I'd like to set the dataCell of an NSTableColumn as a date picker. It works, except that editing the date only works on the hour field (I'm displaying hours/minutes only) of the date using the arrow button in the cell. Here's the code where I set the dataCell:
NSDatePicker *datePicker = [[NSDatePicker alloc] init]; [datePicker setDatePickerElements:NSHourMinuteDatePickerElementFlag]; [startCol setDataCell:[datePicker cell]];
I've also tried just creating the NSDatePickerCell directly rather than the NSDatePicker, but that doesn't seem to matter.
Hi Wil,
Unfortunately, the NSDatePickerCell class in Tiger is not yet equipped for editing use in table and outline views. There's some not insignificant generalizing that will need to be done in the field editor mechanism to make this work.
In the meantime, I'd recommend you use the old reliable standby of an NSTextFieldCell with an attached NSDateFormatter if you need to present editable date values in a table or outline view.
Hope this helps, Troy Stephens Cocoa frameworks, Apple
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden