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) ()
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)

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

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

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 ***