From 638eec5189d4029c103bc1a725e8f79536b82e21 Mon Sep 17 00:00:00 2001 From: Aaron Oneal Date: Mon, 6 May 2013 16:59:51 -0700 Subject: [PATCH 1/3] Update NSNib for Mountain Lion --- src/appkit.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/appkit.cs b/src/appkit.cs index beb6f459f..767407039 100644 --- a/src/appkit.cs +++ b/src/appkit.cs @@ -5807,18 +5807,26 @@ public interface NSMenuView { [BaseType (typeof (NSObject))] public partial interface NSNib { + [Obsolete ("Deprecated in OSX 10.8")] [Export ("initWithContentsOfURL:")] IntPtr Constructor (NSUrl nibFileUrl); [Export ("initWithNibNamed:bundle:")] IntPtr Constructor (string nibName, NSBundle bundle); + + [Export ("initWithNibData:bundle:"), MountainLion] + IntPtr Constructor (NSData data, NSBundle bundle); + + [Export ("instantiateWithOwner:topLevelObjects:"), MountainLion] + bool Instantiate (NSObject owner, out NSArray topLevelObjects); + [Obsolete ("Deprecated in OSX 10.8")] [Export ("instantiateNibWithExternalNameTable:")] bool InstantiateNib (NSDictionary externalNameTable); - // This requires an "out NSArray" - //[Export ("instantiateNibWithOwner:topLevelObjects:")] - //bool InstantiateNib (NSObject owner, NSArray topLevelObjects); + [Obsolete ("Deprecated in OSX 10.8")] + [Export ("instantiateNibWithOwner:topLevelObjects:")] + bool InstantiateNib (NSObject owner, out NSArray topLevelObjects); } [BaseType (typeof (NSController))] From cbc74b7f81566078db4bced0b27bad6cd6038cd0 Mon Sep 17 00:00:00 2001 From: Aaron Oneal Date: Mon, 6 May 2013 17:13:39 -0700 Subject: [PATCH 2/3] Allow null bundle in NSNib constructors --- src/appkit.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/appkit.cs b/src/appkit.cs index 767407039..d7498da20 100644 --- a/src/appkit.cs +++ b/src/appkit.cs @@ -5812,10 +5812,10 @@ public partial interface NSNib { IntPtr Constructor (NSUrl nibFileUrl); [Export ("initWithNibNamed:bundle:")] - IntPtr Constructor (string nibName, NSBundle bundle); + IntPtr Constructor (string nibName, [NullAllowed] NSBundle bundle); [Export ("initWithNibData:bundle:"), MountainLion] - IntPtr Constructor (NSData data, NSBundle bundle); + IntPtr Constructor (NSData data, [NullAllowed] NSBundle bundle); [Export ("instantiateWithOwner:topLevelObjects:"), MountainLion] bool Instantiate (NSObject owner, out NSArray topLevelObjects); From f88a27aebb18082bcfab703d6091d194baca0934 Mon Sep 17 00:00:00 2001 From: Aaron Oneal Date: Mon, 6 May 2013 21:29:39 -0700 Subject: [PATCH 3/3] Allow null window in NSWindowController constructor --- src/appkit.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/appkit.cs b/src/appkit.cs index d7498da20..a346d07c9 100644 --- a/src/appkit.cs +++ b/src/appkit.cs @@ -14402,7 +14402,7 @@ public partial interface NSWindowRestoration { [BaseType (typeof (NSResponder))] public interface NSWindowController { [Export ("initWithWindow:")] - IntPtr Constructor (NSWindow window); + IntPtr Constructor ([NullAllowed] NSWindow window); [Export ("initWithWindowNibName:")] IntPtr Constructor (string windowNibName);