diff --git a/src/Eto.Mac/Forms/Controls/DrawableHandler.cs b/src/Eto.Mac/Forms/Controls/DrawableHandler.cs index b4b95c6f2..f7e27721f 100644 --- a/src/Eto.Mac/Forms/Controls/DrawableHandler.cs +++ b/src/Eto.Mac/Forms/Controls/DrawableHandler.cs @@ -14,6 +14,14 @@ public class DrawableHandler : MacPanel Handler as DrawableHandler; + + public EtoDrawableView() + { + } + + public EtoDrawableView(NativeHandle handle) : base(handle) + { + } public override void DrawRect(CGRect dirtyRect) { diff --git a/src/Eto.Mac/Forms/Controls/GroupBoxHandler.cs b/src/Eto.Mac/Forms/Controls/GroupBoxHandler.cs index fc1c8f92c..877dd99ea 100644 --- a/src/Eto.Mac/Forms/Controls/GroupBoxHandler.cs +++ b/src/Eto.Mac/Forms/Controls/GroupBoxHandler.cs @@ -13,7 +13,13 @@ public class GroupBoxHandler : MacPanel, Gr /// public class EtoContentView : MacPanelView { - + public EtoContentView() + { + } + + public EtoContentView(NativeHandle handle) : base(handle) + { + } } public class EtoBox : NSBox, IMacControl diff --git a/src/Eto.Mac/Forms/Controls/PanelHandler.cs b/src/Eto.Mac/Forms/Controls/PanelHandler.cs index 81707d4af..04e999a7b 100644 --- a/src/Eto.Mac/Forms/Controls/PanelHandler.cs +++ b/src/Eto.Mac/Forms/Controls/PanelHandler.cs @@ -4,6 +4,12 @@ public class PanelHandler : MacPanel, Panel.IHan { public class EtoPanelView : MacPanelView { + public EtoPanelView() + { + } + public EtoPanelView(NativeHandle handle) : base(handle) + { + } } protected override NSView CreateControl() => new EtoPanelView(); diff --git a/src/Eto.Mac/Forms/Controls/ScrollableHandler.cs b/src/Eto.Mac/Forms/Controls/ScrollableHandler.cs index e35dbc362..d3ef89137 100644 --- a/src/Eto.Mac/Forms/Controls/ScrollableHandler.cs +++ b/src/Eto.Mac/Forms/Controls/ScrollableHandler.cs @@ -61,7 +61,7 @@ public EtoDocumentView() { } - public EtoDocumentView(IntPtr handle) + public EtoDocumentView(NativeHandle handle) : base(handle) { diff --git a/src/Eto.Mac/Forms/Controls/TextBoxHandler.cs b/src/Eto.Mac/Forms/Controls/TextBoxHandler.cs index 73de73288..db1cd292b 100644 --- a/src/Eto.Mac/Forms/Controls/TextBoxHandler.cs +++ b/src/Eto.Mac/Forms/Controls/TextBoxHandler.cs @@ -91,9 +91,9 @@ public class EtoTextField : NSTextField, IMacControl, ITextBoxWithMaxLength { public WeakReference WeakHandler { get; set; } - IMacViewHandler Handler => WeakHandler.Target as IMacViewHandler; - IMacText TextHandler => WeakHandler.Target as IMacText; - ITextBoxWithMaxLength MaxLengthHandler => WeakHandler.Target as ITextBoxWithMaxLength; + IMacViewHandler Handler => WeakHandler?.Target as IMacViewHandler; + IMacText TextHandler => WeakHandler?.Target as IMacText; + ITextBoxWithMaxLength MaxLengthHandler => WeakHandler?.Target as ITextBoxWithMaxLength; public int MaxLength { get { return MaxLengthHandler?.MaxLength ?? 0; } } diff --git a/src/Eto.Mac/Forms/MacWindow.cs b/src/Eto.Mac/Forms/MacWindow.cs index 8aeb33c90..1ad838d16 100644 --- a/src/Eto.Mac/Forms/MacWindow.cs +++ b/src/Eto.Mac/Forms/MacWindow.cs @@ -155,7 +155,7 @@ public EtoContentView() { } - public EtoContentView(IntPtr handle) : base(handle) + public EtoContentView(NativeHandle handle) : base(handle) { } } diff --git a/src/Eto.Mac/Forms/TableLayoutHandler.cs b/src/Eto.Mac/Forms/TableLayoutHandler.cs index b1b22b5f1..cfb2b0bd7 100644 --- a/src/Eto.Mac/Forms/TableLayoutHandler.cs +++ b/src/Eto.Mac/Forms/TableLayoutHandler.cs @@ -37,6 +37,10 @@ class EtoTableLayoutView : MacEventView { new TableLayoutHandler Handler => (TableLayoutHandler)base.Handler; + public EtoTableLayoutView(NativeHandle handle) : base(handle) + { + } + public EtoTableLayoutView() { AutoresizesSubviews = false;