diff --git a/ChangeLog b/ChangeLog index c11de22a6..e9c9303ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-06-12 Todd Berman + + * glib/ObjectManager.cs: change CreateInstance overload being used + to properly pick up protected ctors. + 2004-06-11 Todd Berman * gtk/Container.custom: diff --git a/glib/ObjectManager.cs b/glib/ObjectManager.cs index dad107ce3..b7d51d414 100644 --- a/glib/ObjectManager.cs +++ b/glib/ObjectManager.cs @@ -10,6 +10,7 @@ namespace GLib { using System; using System.Collections; using System.Runtime.InteropServices; + using System.Reflection; using System.Text; public class ObjectManager { @@ -46,7 +47,7 @@ namespace GLib { GLib.Object obj; try { - obj = (GLib.Object) Activator.CreateInstance (t, new object[] {raw}); + obj = (GLib.Object) Activator.CreateInstance (t,BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance | BindingFlags.CreateInstance, null, new object[] {raw}, null); } catch (MissingMethodException) { throw new GLib.MissingIntPtrCtorException ("GLib.Object subclass " + t + " must provide a protected or public IntPtr ctor to support wrapping of native object handles."); }