• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSTableView Dragging Issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTableView Dragging Issues


  • Subject: NSTableView Dragging Issues
  • From: John Devor <email@hidden>
  • Date: Sun, 5 Oct 2003 15:16:11 -0400

Hello,
I'm having trouble dragging rows in a tableview. I've got two of the
methods set up correctly (I think) but one of them is giving me a
headache. Here's what I've got so far:

- (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.

  • Follow-Ups:
    • Re: NSTableView Dragging Issues
      • From: John Devor <email@hidden>
  • Prev by Date: Re: NSTask launchpath - space
  • Next by Date: Re: NSTableView Dragging Issues
  • Previous by thread: Re: NSTask launchpath - space
  • Next by thread: Re: NSTableView Dragging Issues
  • Index(es):
    • Date
    • Thread