Bug 30634 - NSComboBox.GetItem signature is incorrect
Summary: NSComboBox.GetItem signature is incorrect
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Library (Xamarin.Mac.dll) ()
Version: Master
Hardware: PC Mac OS
: High normal
Target Milestone: 2.4.0 (C6)
Assignee: Chris Hamons
Depends on:
Reported: 2015-06-01 12:04 UTC by Aaron Bockover [MSFT]
Modified: 2015-10-01 09:18 UTC (History)
3 users (show)

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:

Description Aaron Bockover [MSFT] 2015-06-01 12:04:45 UTC
We bind NSComboBox.GetItem as:

	[Export ("itemObjectValueAtIndex:")]
	NSComboBox GetItem (nint index);

It should be bound as:

	[Export ("itemObjectValueAtIndex:")]
	NSObject GetItem (nint index);

cf. https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSComboBox_Class/index.html#//apple_ref/occ/instm/NSComboBox/itemObjectValueAtIndex:

	- (id)itemObjectValueAtIndex:(NSInteger)index
Comment 1 Aaron Bockover [MSFT] 2015-06-01 12:15:42 UTC
Workaround in case anyone else runs into this until it's fixed in the product:


Add to your project and use the `FixedGetItem` method instead of `GetItem`.
Comment 2 Timothy Risi 2015-06-02 18:26:40 UTC
Fixed on master / b8da9d241737790eee3e95dacfd58eeb18e1ff1f
Comment 3 Rajneesh Kumar 2015-10-01 09:18:58 UTC
I have checked this issue with the cycle 6 builds XS 5.10 (build 811) + X.M + Mono and observed that this issue has been fixed and no longer exist with this build. I observed that now I am getting NSObject in place of NSComboBox. i.e.

                 [Export ("itemObjectValueAtIndex:"), CompilerGenerated]
		 public virtual NSObject GetItemObject (nint index); 

Screencast: http://www.screencast.com/t/TA69mCxWV

This issue has been fixed hence I am closing this issue.