Make sure the field editor isn't getting in the way. The field
editors inserts itself into the first responder chain and grabs
textual input during editing.
<http://developer.apple.com/documentation/Cocoa/Conceptual/
TextEditing/Tasks/FieldEditor.html>
HTH,
->Ben
--
Ben Lachman
Acacia Tree Software
http://acaciatreesoftware.com
[EMAIL PROTECTED]
740.590.0009
On Mar 19, 2008, at 2:58 PM, Hans Hansen wrote:
Anyone know how best to use multiple NSTextCell subclasses, in a
table/outline column?
When I use the dataCell... methods in NSTableColumn, NSTableView,
or NSOutlineView, it works great until I try to edit the cell, at
which point the cells never receive the edit/select actions. I've
tried lots of things but can't figure out what's happening, nor a
better why to do this overall.
In other words:
When I use the dataCellForTableColumn method, my table does display
the different textcell subclasses returned. But when I send the
table/outline [self editColumn:1 row:[self selectedRow]
withEvent:theEvent select:YES] message it seems to get lost -- my
specified cells don't receive an editWithFrame/selectWithFrame
action. If I remove this method and only use one cell class in the
column, it works as expected.
- (NSCell *)outlineView:(NSOutlineView *)outlineView
dataCellForTableColumn:(NSTableColumn *)tableColumn item:(id)item {
if ([item isKindOfClass:[Project class]]) return projectTextCell;
if ([item isKindOfClass:[Action class]]) return actionTextCell;
if ([item isKindOfClass:[Item class]]) return itemTextCell;
if ([item isKindOfClass:[Note class]]) return noteTextCell;
return nil;
}
The point of this is to breakout my cell designs for efficiency and
comprehension. But so far it's just making me nuts. ;-).
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]