Author: rolf
Date: 2007-07-12 11:34:17 -0400 (Thu, 12 Jul 2007)
New Revision: 81876
Modified:
trunk/mcs/class/System/System.ComponentModel/ChangeLog
trunk/mcs/class/System/System.ComponentModel/TypeDescriptor.cs
Log:
* TypeDescriptor.cs: GetEditor: Make sure the static constructor of the
editors basetype is called, since that's where we're initializing
the editor table.
Modified: trunk/mcs/class/System/System.ComponentModel/ChangeLog
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/ChangeLog 2007-07-12
14:50:11 UTC (rev 81875)
+++ trunk/mcs/class/System/System.ComponentModel/ChangeLog 2007-07-12
15:34:17 UTC (rev 81876)
@@ -1,3 +1,9 @@
+2007-07-12 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
+
+ * TypeDescriptor.cs: GetEditor: Make sure the static constructor of the
+ editors basetype is called, since that's where we're initializing
+ the editor table.
+
2007-07-11 Igor Zelmanovich <[EMAIL PROTECTED]>
* ReflectionPropertyDescriptor: fixed ShouldSerializeValue:
Modified: trunk/mcs/class/System/System.ComponentModel/TypeDescriptor.cs
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/TypeDescriptor.cs
2007-07-12 14:50:11 UTC (rev 81875)
+++ trunk/mcs/class/System/System.ComponentModel/TypeDescriptor.cs
2007-07-12 15:34:17 UTC (rev 81876)
@@ -517,8 +517,15 @@
if (t != null)
return CreateEditor (t, componentType);
- if (t == null && editors != null) {
+ if (t == null) {
+ // Make sure the editorBaseType's static constructor
has been called,
+ // since that's where we're putting the initialization
of its editor table.
+
+
System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor
(editorBaseType.TypeHandle);
+
+ if (editors != null) {
return FindEditorInTable (componentType,
editorBaseType, editors [editorBaseType] as Hashtable);
+ }
}
return null; // No editor specified
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches