Re: NSTableView Dragging Issues
Re: NSTableView Dragging Issues
- Subject: Re: NSTableView Dragging Issues
- From: John Devor <email@hidden>
- Date: Sun, 5 Oct 2003 15:22:34 -0400
Hrm... Okay, anyways... my last message did have something written on
the top... I'm basically having a bit of trouble getting my tableview
to drag items correctly. I understand how to do two of the methods (I
think) but one of them is giving me a real headache.
On Sunday, October 5, 2003, at 03:16 PM, John Devor wrote:
- (BOOL)tableView:(NSTableView *)tableView writeRows:(NSArray *)rows
toPasteboard:(NSPasteboard *)pboard
{
_draggedArray = rows; // _draggedArray is a pointer to an array
[pboard declareTypes:[NSArray arrayWithObjects:
DragDropSimplePboardType, nil] owner:self];
[pboard setData:[NSData data] forType:DragDropSimplePboardType];
return YES;
}
- (NSDragOperation)tableView:(NSTableView *)tableView validateDrop:(id
<NSDraggingInfo>)info proposedRow:(int)row
{
// I've really know idea what should go in here.
}
- (BOOL)tableView:(NSTableView *)tableView acceptDrop:(id <NSDragging
Info>)info row:(int)row
dropOperation:(NSTableViewDropOperation)operation
{
return YES; // I think this should work for now.
}
I've checked Apple's DragNDropOutlineView example, but I found it
rather cluttered and confusing. Oh, and I'm managing an array of
objects if that matters (not just strings). If anyone has some source
I'd be most thankful :-) .
Thanks,
John D.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.