Author: fejj
Date: 2007-06-20 16:03:01 -0400 (Wed, 20 Jun 2007)
New Revision: 80356

Modified:
   trunk/olive/class/agclr/ChangeLog
   trunk/olive/class/agclr/Internal.cs
Log:
2007-06-20  Jeffrey Stedfast  <[EMAIL PROTECTED]>

        * Internal.cs (Current): We can't reuse the Collection-type Kind
        as the kind of object we're looking for since if it fails to find
        a pre-cached managed object for that IntPtr, it will try to
        instantiate a new one. Instead, we need the /actual/ object type,
        so request that from the NativeMethods.



Modified: trunk/olive/class/agclr/ChangeLog
===================================================================
--- trunk/olive/class/agclr/ChangeLog   2007-06-20 19:58:32 UTC (rev 80355)
+++ trunk/olive/class/agclr/ChangeLog   2007-06-20 20:03:01 UTC (rev 80356)
@@ -1,3 +1,11 @@
+2007-06-20  Jeffrey Stedfast  <[EMAIL PROTECTED]>
+
+       * Internal.cs (Current): We can't reuse the Collection-type Kind
+       as the kind of object we're looking for since if it fails to find
+       a pre-cached managed object for that IntPtr, it will try to
+       instantiate a new one. Instead, we need the /actual/ object type,
+       so request that from the NativeMethods.
+
 2007-06-20  Rolf Bjarne Kvinge <[EMAIL PROTECTED]> 
 
        * agclr.dll.sources: Updated.

Modified: trunk/olive/class/agclr/Internal.cs
===================================================================
--- trunk/olive/class/agclr/Internal.cs 2007-06-20 19:58:32 UTC (rev 80355)
+++ trunk/olive/class/agclr/Internal.cs 2007-06-20 20:03:01 UTC (rev 80356)
@@ -113,11 +113,14 @@
                        public object Current {
                                get {
                                        IntPtr o = 
NativeMethods.collection_iterator_get_current (native_iter);
-
+                                       Kind k;
+                                       
                                        if (o == IntPtr.Zero)
                                                return null;
-
-                                       return DependencyObject.Lookup (kind, 
o);
+                                       
+                                       k = 
NativeMethods.dependency_object_get_kind (o);
+                                       
+                                       return DependencyObject.Lookup (k, o);
                                }
                        }
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to