I'm doing DND in an NSTableView subclass. My
tableView:acceptDrop:row:dropOperation: had no effect. But I
discovered the pasteboard wasn't set correctly in
tableView:writeRowsWithIndexes:toPasteboard:. I NSLogged some
information and found out something weird that I can't explain. I
have another very similar tableView where the same method behaves
properly. Under what conditions something like this could occur?
- (BOOL) tableView: (NSTableView *)tv
writeRowsWithIndexes: (NSIndexSet *)indexes
toPasteboard: (NSPasteboard *)pboard
{
NSArray *typesArray = [NSArray arrayWithObjects:
PVMovedRowsType, nil];
[pboard declareTypes:typesArray owner:self];
[pboard setPropertyList:indexes forType: PVMovedRowsType];
NSMutableArray *rowCopies = [NSMutableArray arrayWithArray: [[self
arrangedObjects] objectsAtIndexes: indexes]] ;
NSLog(@"%@", rowCopies);
[pboard setPropertyList:rowCopies forType: PVMovedRowsType]; // set
the pasteBoard property list with a type
NSLog(@"%d", [pboard setPropertyList:rowCopies forType:
PVMovedRowsType]);
NSLog(@"%@", pboard);
NSLog(@"%@", [pboard types]);
NSLog(@"%@", [pboard propertyListForType: PVMovedRowsType]); // read
the pasteBoard list with the type
What happened to the property list that was just set??
Thank you for your help!
Tristan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden