Re: Bindings with Differing Data Cells
Re: Bindings with Differing Data Cells
- Subject: Re: Bindings with Differing Data Cells
- From: Duncan Alexander Oliver <email@hidden>
- Date: Sat, 10 Dec 2005 11:26:08 -0600
- Resent-date: Sat, 10 Dec 2005 12:14:30 -0600
- Resent-from: Duncan Alexander Oliver <email@hidden>
- Resent-message-id: <email@hidden>
- Resent-to: email@hidden
...And I've found another problem.
For some reason, I can't edit a cell in the subclassed table column
if it's a NSTextFieldCell or a subclass of such. I've enabled and
allowed editing of the cell in its initialization stage. Commenting
out the custom implementation of dataCellForRow allows the text field
cell to be editable again. Any ideas? Thanks in advance.
--
Duncan Oliver
email@hidden
On Dec 8, 2005, at 7:53 AM, Duncan Alexander Oliver wrote:
Well, I found a solution.
Seems that it works better if you set the data cell in Interface
Builder to NSTextFieldCell and use the cells data binding as
opposed to the table column's.
Still, it's a little weird that it tried to set a placeholder
string when I didn't have any specified.
---
Duncan Oliver
email@hidden
On Dec 8, 2005, at 6:54 AM, John C. Randolph wrote:
On Dec 7, 2005, at 7:27 PM, Duncan Alexander Oliver wrote:
To allow for different data cells in the same table column, I've
subclassed NSTableColumn, overridden dataCellForRow and kept it's
data cell to the default cell in Interface Builder. One of these
varying cells, for example, is a NSDatePickerCell. The problem is
that when I try to bind it to an array controller, I get the
following error.
-[NSDatePickerCell setPlaceholderString:]: selector not
recognized [self = 0x5313ad0]
This also happens with a NSPopUpButtonCell. I have no
placeholders set in the binding options, both when I've tried
binding the table column both with Interface Builder and
programmatically. Is this a bug? I'm I going to have to change
the data cell in Interface Builder, and if so, to what? Thanks in
advance.
It may or may not be a bug, but I'd try stubbing out -
setPlaceHolderString: in a category, and see if that gets you
unstuck.
@implementation NSDatePickerCell (stub)
- (void) setPlaceholderString:(NSString *)string { return; }
@end
-jcr
John C. Randolph <email@hidden> (408) 914-0013
Roaming Cocoa Engineer,
Available for your projects at great Expense and Inconvenience.
_______________________________________________
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