Also add [Advice] to help people using writing applications that runs inside the sandbox. reference: https://github.com/xamarin/xamarin-macios/issues/5336
This commit is contained in:
Родитель
b9de5926f4
Коммит
fbd63db027
|
@ -1,21 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Foundation;
|
||||
using ObjCRuntime;
|
||||
|
||||
namespace AppKit
|
||||
{
|
||||
public partial class NSOpenPanel
|
||||
{
|
||||
[Export ("openPanel")]
|
||||
public static NSOpenPanel OpenPanel {
|
||||
get {
|
||||
// [NSOpenPanel openPanel] will always create a new instance, so there's no need to check if there already is
|
||||
// a managed object with the same pointer.
|
||||
IntPtr ptr = Messaging.IntPtr_objc_msgSend (Class.GetHandle ("NSOpenPanel"), Selector.GetHandle ("openPanel"));
|
||||
return new NSOpenPanel (ptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Foundation;
|
||||
using ObjCRuntime;
|
||||
|
||||
namespace AppKit
|
||||
{
|
||||
public partial class NSSavePanel
|
||||
{
|
||||
[Export ("savePanel")]
|
||||
public static NSSavePanel SavePanel {
|
||||
get {
|
||||
// [NSSavePanel savePanel] will always create a new instance, so there's no need to check if there already is
|
||||
// a managed object with the same pointer.
|
||||
IntPtr ptr = Messaging.IntPtr_objc_msgSend (Class.GetHandle ("NSSavePanel"), Selector.GetHandle ("savePanel"));
|
||||
return new NSSavePanel (ptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -8643,7 +8643,17 @@ namespace AppKit {
|
|||
}
|
||||
|
||||
[BaseType (typeof (NSSavePanel))]
|
||||
[DisableDefaultCtor]
|
||||
interface NSOpenPanel {
|
||||
[Static]
|
||||
[Export ("openPanel")]
|
||||
[ForcedType] // different type used inside a sandbox
|
||||
NSOpenPanel OpenPanel { get; }
|
||||
|
||||
[Advice ("You must use 'OpenPanel' method if the application is sandboxed.")]
|
||||
[Export ("init")]
|
||||
IntPtr Constructor ();
|
||||
|
||||
[Export ("URLs")]
|
||||
NSUrl [] Urls { get; }
|
||||
|
||||
|
@ -12896,7 +12906,17 @@ namespace AppKit {
|
|||
delegate void NSSavePanelComplete (nint result);
|
||||
|
||||
[BaseType (typeof (NSPanel), Delegates=new string [] { "Delegate" }, Events=new Type [] { typeof (NSOpenSavePanelDelegate)})]
|
||||
[DisableDefaultCtor]
|
||||
interface NSSavePanel {
|
||||
[Static]
|
||||
[Export ("savePanel")]
|
||||
[ForcedType] // different type used inside a sandbox
|
||||
NSSavePanel SavePanel { get; }
|
||||
|
||||
[Advice ("You must use 'SavePanel' method if the application is sandboxed.")]
|
||||
[Export ("init")]
|
||||
IntPtr Constructor ();
|
||||
|
||||
[Export ("URL")]
|
||||
NSUrl Url { get; }
|
||||
|
||||
|
|
|
@ -138,8 +138,6 @@ APPKIT_SOURCES = \
|
|||
AppKit/NSTouch.cs \
|
||||
AppKit/NSTreeController.cs \
|
||||
AppKit/NSWindow.cs \
|
||||
AppKit/NSOpenPanel.cs \
|
||||
AppKit/NSSavePanel.cs \
|
||||
AppKit/NSWorkspace.cs \
|
||||
AppKit/NSCollectionView.cs \
|
||||
AppKit/NSCollectionViewDelegate.cs \
|
||||
|
|
|
@ -1128,9 +1128,7 @@
|
|||
!missing-selector! +NSBezierPath::bezierPath not bound
|
||||
!missing-selector! +NSCursor::pop not bound
|
||||
!missing-selector! +NSInputManager::currentInputManager not bound
|
||||
!missing-selector! +NSOpenPanel::openPanel not bound
|
||||
!missing-selector! +NSPDFPanel::panel not bound
|
||||
!missing-selector! +NSSavePanel::savePanel not bound
|
||||
!missing-selector! +NSSound::soundUnfilteredFileTypes not bound
|
||||
!missing-selector! +NSSound::soundUnfilteredPasteboardTypes not bound
|
||||
!missing-selector! NSBezierPath::cachesBezierPath not bound
|
||||
|
|
Загрузка…
Ссылка в новой задаче