NSTextFieldCell+NSDateFormatter in NSTableView
NSTextFieldCell+NSDateFormatter in NSTableView
- Subject: NSTextFieldCell+NSDateFormatter in NSTableView
- From: Jerry Krinock <email@hidden>
- Date: Mon, 2 Feb 2009 14:48:09 -0800
It seems to be known that NSDatePickerCell does not work in an
NSTableView [1]. I have just re-discovered that the minor digits are
not editable and that it does not highlight properly, as reported in
2006 [2].
So, instead I tried an NSTextFieldCell with a date formatter. It
edits and highlights properly.
However, I need to disable it in some rows, depending on other
properties of the object represented by the row. It appears that the
'Editable' setting of the table column is ignored, and the cell's
editability is controlled by the 'Editable' property of the date
formatter.
But the date formatter appears to be shared by all rows, because if I
bind it's 'Editable' binding to my 'canEditDate' accessor via the
table's array controller's arrangedObjects, I get a runtime complaint
that it cannot bind an array of BOOLs to a BOOL.
So it appears as though there is no way to have the text/date picker
selected in some rows and not selected in others.
Has anyone ever thought of a good workaround for this, or know where I
can find a date picker cell that works in a table view?
Sincerely,
Jerry Krinock
[1] http://lists.apple.com/archives/cocoa-dev/2005/May/msg01114.html
[2] http://lists.apple.com/archives/cocoa-dev/2006/Aug/msg01195.html
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden