• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Removing item from CollectionView by drag it out.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Removing item from CollectionView by drag it out.
      • From: Joachim Deelen <email@hidden>
References: 
 >Removing item from CollectionView by drag it out. (From: Sandro Noël <email@hidden>)
 >Re: Removing item from CollectionView by drag it out. (From: Sandro Noël <email@hidden>)

  • Prev by Date: Re: Cocoa equivalent for 'InstallApplicationEventHandler'
  • Next by Date: Re: Document not Saving Text View Attachment
  • Previous by thread: Re: Removing item from CollectionView by drag it out.
  • Next by thread: Re: Removing item from CollectionView by drag it out.
  • Index(es):
    • Date
    • Thread