NSTableView Drag and drop (internally)
NSTableView Drag and drop (internally)
- Subject: NSTableView Drag and drop (internally)
- From: Brian Amerige <email@hidden>
- Date: Fri, 18 Aug 2006 20:14:19 -0400
I'm just wondering about an NSTableView and drag/drop, but within
itself (read: the draggingSource is the tableview, and the dropping
place is also the same tableview.)
I've got everything properly set up and functional as far as
registering the tableview for it's dragging types, and writing the
rows to the pasteboard. Here's part of my writeRows toPasteboard method:
[pboard declareTypes:[NSArray
arrayWithObject:cxRemoteFilePBoardType] owner:nil];
[pboard setPropertyList:f forType:cxRemoteFilePBoardType];
My confusion comes with accepting the drop. Here's my method for that:
if ([[pb types] containsObject:cxRemoteFilePBoardType])
{
NSArray *files2 = [pb propertyListForType:cxRemoteFilePBoardType];
NSEnumerator *e = [files2 objectEnumerator];
NSString *cur;
while (cur = [e nextObject])
{
[self downloadFile:[[ftp currentDirectory]
stringByAppendingPathComponent:cur]
toFolder: currentLocalPath];
}
[files reloadData];
return YES;
}
On run, when I drag and drop a row(file) into another row(folder), I
get this on the console:
*** -[SpecialTableView propertyListForType:]: selector not recognized
[self = 0x391680]
Any ideas?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden