Bug 26928 - [Missing API] NSModalResponse OK and Cancel are missing
Summary: [Missing API] NSModalResponse OK and Cancel are missing
Status: VERIFIED FIXED
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Library (Xamarin.Mac.dll) ()
Version: 1.11.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: 2.0.x
Assignee: Timothy Risi
URL:
Depends on:
Blocks:
 
Reported: 2015-02-10 16:06 UTC by Stephen Shaw
Modified: 2015-03-04 05:39 UTC (History)
4 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:
VERIFIED FIXED

Description Stephen Shaw 2015-02-10 16:06:03 UTC
NSModalResponse has some values but it is missing OK and Cancel:
NSWindow.h:
// Additional NSModalResponse values
enum {
    NSModalResponseOK = 1,
    NSModalResponseCancel	= 0
} NS_ENUM_AVAILABLE_MAC(10_9);

They replace these in NSPanel.h (also missing)
enum {
    NSOKButton NS_ENUM_DEPRECATED_MAC(10_0, 10_10, "Use NSModalResponseOK instead") = 1, // NSModalResponseOK should be used instead (in NSWindow)
    NSCancelButton NS_ENUM_DEPRECATED_MAC(10_0, 10_10, "Use NSModalResponseCancel instead") = 0  // NSModalResponseCancel should be used instead (in NSWindow)
};
Comment 2 Chris Hamons 2015-02-20 18:05:45 UTC
Bug is requesting additional APIs.
Comment 3 Timothy Risi 2015-02-23 18:26:30 UTC
Fixed in master / e953b4cc5b54b2626ac10152b3a4176adbb2936e
Comment 4 Udham Singh 2015-03-04 05:39:32 UTC
I have checked this issue and observed that now enum NSModalResponse contains both "OK" and "Cancel". Hence I am closing this issue. Please refer the screencast : http://www.screencast.com/t/YkzufQ0lrNM

I have verified this issue on following builds 

Mac OS X 10.9.5
Xamarin Studio 5.9 (build 120)
Mono 4.0.0 ((detached/51d34c6)
GTK+ 2.24.23 (Raleigh theme)
Xcode 6.2 (6770)
Xamarin.Mac 2.0.0.1 (Business Edition)