On Mar 14, 2011, at 12:33 PM, Quincey Morris wrote:
> On Mar 14, 2011, at 12:20, Carter R. Harrison wrote:
>
>> I'm having trouble getting drag and drop to work with an NSOutlineView.
>> What I've done is below. The problem is that
>> "tableView:writeRowsWithIndexes:toPasteboard" never gets
Ack! I can't believe I missed that. The correct method to implement is:
- (BOOL)outlineView:(NSOutlineView *)outlineView writeItems:(NSArray *)items
toPasteboard:(NSPasteboard *)pboard
Once I changed the method declaration and a few of the implementation details
drag and drop is now working!
On Mar 14, 2011, at 12:20, Carter R. Harrison wrote:
> I'm having trouble getting drag and drop to work with an NSOutlineView. What
> I've done is below. The problem is that
> "tableView:writeRowsWithIndexes:toPasteboard" never gets called. I found a
> few people with the same issue and it s
The custom cell I'm using is a modification of "ImageAndTextCell" from the
DragNDropOutlineView sample project. In that class they have some comments
that describe how "hitTestForEvent:inRect:ofView:" works. It's my
understanding that if I return anything other than NSCellHitTrackableArea a
d
Your custom cell needs to properly implement:
- (NSUInteger)hitTestForEvent:(NSEvent *)event inRect:(NSRect)cellFrame
ofView:(NSView *)controlView NS_AVAILABLE_MAC(10_5);
See the header for details or the AnimatedTableView demo.
--corbin
On Mar 14, 2011, at 12:20 PM, Carter R. Harrison wrote:
I'm having trouble getting drag and drop to work with an NSOutlineView. What
I've done is below. The problem is that
"tableView:writeRowsWithIndexes:toPasteboard" never gets called. I found a few
people with the same issue and it seems that the cause of the problem is that I
am using a custo