FROM : Corbin Dunn
DATE : Mon Apr 21 19:08:28 2008
>
>
> I seem to recall that in 10.5 there is new API, either in
> NSTableView or NSActionCell, that makes this easy to do; but I just
> looked through both headers and can't find it. Does anyone else
> remember?
Yeah, I remember. The DragNDropOutlineView demo shows how.
Basically, you implement:
- (BOOL)tableView:(NSTableView *)tableView shouldTrackCell:(NSCell
*)cell forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row;
And return YES, even if you don't allow the row to be selected, or if
the table refuses first responder. You could refuse first responder
via -acceptsFirstResponder by looking at [NSApp currentEvent] and
determining if it is hit in the given cell (The demo app does
something like this for refusing to change the row).
corbin
DATE : Mon Apr 21 19:08:28 2008
>
>
> I seem to recall that in 10.5 there is new API, either in
> NSTableView or NSActionCell, that makes this easy to do; but I just
> looked through both headers and can't find it. Does anyone else
> remember?
Yeah, I remember. The DragNDropOutlineView demo shows how.
Basically, you implement:
- (BOOL)tableView:(NSTableView *)tableView shouldTrackCell:(NSCell
*)cell forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row;
And return YES, even if you don't allow the row to be selected, or if
the table refuses first responder. You could refuse first responder
via -acceptsFirstResponder by looking at [NSApp currentEvent] and
determining if it is hit in the given cell (The demo app does
something like this for refusing to change the row).
corbin
| Related mails | Author | Date |
|---|---|---|
| Peter Zegelin | Apr 19, 12:05 | |
| Jens Alfke | Apr 19, 17:29 | |
| Graham Cox | Apr 20, 03:04 | |
| Peter Zegelin | Apr 20, 09:06 | |
| Graham Cox | Apr 20, 11:28 | |
| Peter Zegelin | Apr 20, 12:51 | |
| Graham Cox | Apr 20, 16:36 | |
| Peter Zegelin | Apr 21, 12:16 | |
| Corbin Dunn | Apr 21, 19:08 |






Cocoa mail archive

