From ed9fee30388f6f9d7be34cb25152ddd87cb55f46 Mon Sep 17 00:00:00 2001 From: Francisco Ryan Tolmasky I Date: Sat, 20 Mar 2010 20:56:37 -0700 Subject: [PATCH] Added collectionView:canDragItemAtIndexes:forEvent:. Reviewed by me. --- AppKit/CPCollectionView.j | 4 ++++ Foundation/CPProxy.j | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/AppKit/CPCollectionView.j b/AppKit/CPCollectionView.j index 3bd31a1a1..14c4dcc96 100644 --- a/AppKit/CPCollectionView.j +++ b/AppKit/CPCollectionView.j @@ -597,6 +597,10 @@ if (![_selectionIndexes count]) return; + if ([_delegate respondsToSelector:@selector(collectionView:canDragItemsAtIndexes:withEvent:)] && + ![_delegate collectionView:self canDragItemsAtIndexes:_selectionIndexes withEvent:anEvent]) + return; + // Set up the pasteboard var dragTypes = [_delegate collectionView:self dragTypesForItemsAtIndexes:_selectionIndexes]; diff --git a/Foundation/CPProxy.j b/Foundation/CPProxy.j index 28bf7c11a..2d5fba736 100644 --- a/Foundation/CPProxy.j +++ b/Foundation/CPProxy.j @@ -61,7 +61,7 @@ - (void)forwardInvocation:(CPInvocation)anInvocation { [CPException raise:CPInvalidArgumentException - reason:@"-methodSignatureForSelector: called on abstract CPProxy class."]; + reason:@"-forwardInvocation: called on abstract CPProxy class."]; } // FIXME: This should be moved to the runtime?