Bug 54882 - [APIBreak] NSCollectionViewDelegate.ValidateDrop has wrong signature
Summary: [APIBreak] NSCollectionViewDelegate.ValidateDrop has wrong signature
Status: RESOLVED DUPLICATE of bug 60416
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Library (Xamarin.Mac.dll) (show other bugs)
Version: 3.4.0 (15.2)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: 15.6
Assignee: Bugzilla
Depends on:
Reported: 2017-04-08 14:52 UTC by Andrew T
Modified: 2017-11-13 20:19 UTC (History)
3 users (show)

See Also:
Is this bug a regression?: No
Last known good build:


Description Andrew T 2017-04-08 14:52:34 UTC
NSCollectionViewDelegate.ValidateDrop has proposedDropIndexPath and proposedDropOperation parameters marked as out parameters forcing the implementer to set them.

According to Apple's documentation, these values should be passed by reference giving the implementer the option to change them, but not require them to provide the values.

A work around is to not override the delegate method and instead export it manually:
public NSDragOperation ValidateDrop(NSCollectionView collectionView,
			            NSDraggingInfo draggingInfo,
			            ref NSIndexPath proposedDropIndexPath,
				   ref NSCollectionViewDropOperation proposedDropOperation){

Comment 1 Chris Hamons 2017-04-10 17:14:28 UTC
Your analysis looks correct.

I'm not sure we can fix this generally without and API break, but re-exporting is an appropriate work around.
Comment 2 Sebastien Pouliot 2017-11-13 20:19:37 UTC

*** This bug has been marked as a duplicate of bug 60416 ***

Note You need to log in before you can comment on or make changes to this bug.