Bug 28597 - SortDescriptors is missing comparator method signature
Summary: SortDescriptors is missing comparator method signature
Status: RESOLVED FIXED
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Library (Xamarin.Mac.dll) ()
Version: Master
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: 2.4.0 (C6)
Assignee: Chris Hamons
URL:
Depends on:
Blocks:
 
Reported: 2015-03-31 12:46 UTC by Stephen Shaw
Modified: 2015-04-01 14:36 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
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:
Status:
RESOLVED FIXED

Description Stephen Shaw 2015-03-31 12:46:14 UTC
Here is the missing method:
https://developer.apple.com/library/prerelease/ios/documentation/Cocoa/Reference/Foundation/Classes/NSSortDescriptor_Class/index.html#//apple_ref/occ/clm/NSSortDescriptor/sortDescriptorWithKey:ascending:comparator:

This is very useful because you don't have to extend an existing objective-c object, but can provide your own comparer function.
Comment 1 Stephen Shaw 2015-03-31 12:46:55 UTC
Here is an objective-c project that shows how to use both the selector and comparator
https://github.com/decriptor/NSTableViewSorting
Comment 2 Rajneesh Kumar 2015-03-31 13:41:15 UTC
I have checked this issue and able to reproduce this. To reproduce this issue I have followed the steps given below:

1. Create a Xam.mac Unified project.
2. go to assembly browser, and search for "NSSortDescriptor" class.
3. Now search for signature for comparator i.e:  initWithKey:ascending:comparator:

I observed that signature for comparator is missing. Please refer the screencast for the same.

Screencast: http://www.screencast.com/t/gGp7Lg6m5dd
Ide Logs: https://gist.github.com/Rajneesh360Logica/d6af1de878c5003682e6

Environment Info:
=== Xamarin Studio ===

Version 5.9 (build 380)
Installation UUID: 011d70a5-dede-428b-ab04-ef451c2e539d
Runtime:
	Mono 4.0.0 ((detached/21d849b)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400000121

=== Apple Developer Tools ===

Xcode 6.2 (6776)
Build 6C131e

=== Xamarin.iOS ===

Version: 8.10.0.178 (Business Edition)
Hash: c0077ab
Branch: master
Build date: 2015-03-30 21:55:10-0400

=== Xamarin.Android ===

Version: 5.1.0.94 (Business Edition)
Android SDK: /Users/MM/Desktop/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 2.0.0.178 (Business Edition)

=== Build Information ===

Release ID: 509000380
Git revision: adb95e28458445fb3e7bdc3a871ab638c08b017f
Build date: 2015-03-31 03:12:08-04
Xamarin addins: a0de3162ce578bb1deb631087efed2bdea788d57

=== Operating System ===

Mac OS X 10.9.5
Darwin MacMini.local 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Comment 3 Chris Hamons 2015-04-01 14:36:17 UTC
* 1f55502 - (HEAD, origin/master, origin/HEAD, master) Add NSSortDescriptor comparator ctor (7 seconds ago)<Chris Hamons>