2004-06-12 Todd Berman <tberman@sevenl.net>

* glib/ObjectManager.cs: change CreateInstance overload being used
        to properly pick up protected ctors.

svn path=/trunk/gtk-sharp/; revision=29412
This commit is contained in:
Todd Berman 2004-06-12 17:48:58 +00:00
parent 9f492c794b
commit 80726b6454
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2004-06-12 Todd Berman <tberman@sevenl.net>
* glib/ObjectManager.cs: change CreateInstance overload being used
to properly pick up protected ctors.
2004-06-11 Todd Berman <tberman@sevenl.net>
* gtk/Container.custom:

View file

@ -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.");
}