NSTableView: serious flaw when it comes to text edition?
NSTableView: serious flaw when it comes to text edition?
- Subject: NSTableView: serious flaw when it comes to text edition?
- From: Stephane Sudre <email@hidden>
- Date: Tue, 6 Sep 2005 12:26:49 +0200
Let's say I have a NSTableView with one column for text edition.
If I set the data cell of the column to be a NSTextFieldCell, when I
click on a cell in that column, - (void)tableView:(NSTableView
*)aTableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn
*) inColumn row:(int) inRow is not invoked.
If I set the data cell of the column to be a subclass of
NSTextFieldCell, when I click on a cell in that column, -
(void)tableView:(NSTableView *)aTableView setObjectValue:(id)anObject
forTableColumn:(NSTableColumn *) inColumn row:(int) inRow is invoked.
Looks like to be an annoying design flaw in the AppKit.
The code is basically:
tPrototypeCell = [[NSTextFieldCell alloc] initTextCell: @""]; //Works
//tPrototypeCell = [[MyTextFieldCell alloc] initTextCell: @""]; // Does
not work correctly
[tPrototypeCell setEditable: YES];
[tPrototypeCell setFont:[NSFont systemFontOfSize:12.0]];
tColumn=[IBarray_ tableColumnWithIdentifier:@"ColumnName"];
[tColumn setDataCell:tPrototypeCell];
[tPrototypeCell release];
MyTextFieldCell is just overriding the - drawInteriorWithFrame:inView:
method. (Mac OS X 10.3.9)
_______________________________________________
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