Re: Removing item from CollectionView by drag it out.
Re: Removing item from CollectionView by drag it out.
- Subject: Re: Removing item from CollectionView by drag it out.
- From: Sandro Noël <email@hidden>
- Date: Sat, 20 Feb 2010 14:58:56 -0500
So should I understand that NCCollectionView as a Drag Source is Broken enough
for no one in this list to pay it attention?
Has anyone got it working?
I'm Confused.
Drop destination works like a charm for me, just by implementing the NSCollectionViewDelegate protocol as part of my window controller
the delegate being set for the Collection view in interface builder as the window controller.
There are also methods for the drag Source but i can't seem to get them working properly.
I can drag my item from the CollectionView to another CollectionView, the drop get's accepted
but then, i get an error about URL's, i've never asked for URL's as a mater of fact my destination accepts only one type.
NSFilenamesPboardType
which is an array of strings containing file path.
that is exactly what i construct to past to the pasteboard as so.
- (BOOL)collectionView:(NSCollectionView *)collectionView writeItemsAtIndexes:(NSIndexSet *)indexes toPasteboard:(NSPasteboard *)pasteboard{
ENTERING();
[pasteboard clearContents];
[pasteboard declareTypes:[NSArray arrayWithObject:NSFilenamesPboardType] owner:nil];
// we only allow one object to be selected.
DItem *object = [[itemsArrayController selectedObjects] objectAtIndex:0];
[pasteboard writeObjects:[NSArray arrayWithObject:object.path]];
return YES;
}
[30040:a0f] Looked for URLs on the pasteboard, but found none.
any clue is welcome.
thanks
Sandro._______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden