Re: NSTableView Drag and drop (internally)
Re: NSTableView Drag and drop (internally)
- Subject: Re: NSTableView Drag and drop (internally)
- From: Corbin Dunn <email@hidden>
- Date: Fri, 18 Aug 2006 17:21:05 -0700
On Aug 18, 2006, at 5:14 PM, Brian Amerige wrote:
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?
Well, you are doing something wrong. i can't tell by looking at the
code snippets. Cut/paste the entire methods that you are using, that
will help.
To debug, i suggest adding a symbolic breakpoint on "[NSException
raise]" and going from there to find out what is calling that and
when. That will give you the answer as to what is going wrong
(possibly ;)
-corbin
_______________________________________________
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