Hi Sandro,

it seems, that NSCollectionViews are not used very frequently, among the 
Members of this list. I've asked several questions regarding NSCollectionsViews 
here, but almost never got a reply.

I've never done drag&drop from or to a NSCollectionView, so I can't help you 
either. I've done it among the items in the View but never used the techniques 
introduced in 10.6. Sorry...

regards,
Joachim



Am 20.02.2010 um 20:58 schrieb Sandro Noël:

> 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 (Cocoa-dev@lists.apple.com)
> 
> 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:
> http://lists.apple.com/mailman/options/cocoa-dev/cocoa-dev%40deelen.de
> 
> This email sent to cocoa-...@deelen.de
> 

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to