private bool preferred;\r
private string name;\r
private bool needs_chaining = false;\r
+ private bool mini_object = false;
\r
public Ctor (XmlElement elem, ClassBase implementor) : base (elem, implementor) \r
{\r
if (implementor is ObjectGen || implementor is MiniObjectGen)\r
needs_chaining = true;\r
name = implementor.Name;\r
+ mini_object = implementor is MiniObjectGen;
}\r
\r
public bool Preferred {\r
sw.WriteLine ("\t\t\tif (GetType () != typeof (" + name + ")) {");\r
\r
if (Parameters.Count == 0) {\r
- sw.WriteLine ("\t\t\t\tCreateNativeObject (new string [0], new GLib.Value[0]);");\r
+ if (mini_object)
+ sw.WriteLine ("\t\t\t\tCreateNativeObject ();");\r
+ else
+ sw.WriteLine ("\t\t\t\tCreateNativeObject (new string [0], new GLib.Value[0]);");\r
sw.WriteLine ("\t\t\t\treturn;");\r
} else {\r
+ if (mini_object)
+ throw new Exception ("MiniObject subclasses can't have ctors with parameters");
ArrayList names = new ArrayList ();\r
ArrayList values = new ArrayList ();\r
for (int i = 0; i < Parameters.Count; i++) {\r