View Issue Details

IDProjectCategoryView StatusLast Update
0003040NoesisGUIUnitypublic2024-01-24 10:13
ReporterOtter Assigned Tosfernandez  
PrioritynormalSeverityminor 
Status resolvedResolutionfixed 
Product Version3.2.2 
Target Version3.2.3Fixed in Version3.2.3 
Summary0003040: InvalidOperationException: Native type 'TypeConverter' is not registered
Description

When using Type property in MarkupExtension:
[code]
public class SomeExtension : MarkupExtension
{
public Type Type { get; set; }
public override object ProvideValue(IServiceProvider serviceProvider)
{
// Do something with Type
}
}
[/code]

and using it like this:

[code]
<namespace:Some Type="{x:Type namespace:SomeType}"/>
[/code]

It throws: InvalidOperationException: Native type 'TypeConverter' is not registered

PlatformAny

Activities

sfernandez

sfernandez

2024-01-23 17:48

manager   ~0009110

Could you please try with the following patch.

TypePropertyBug.patch (870 bytes)   
Index: Extend.cs
===================================================================
--- Extend.cs	(revision 13230)
+++ Extend.cs	(working copy)
@@ -5193,7 +5193,7 @@
             {
                 Type type = GetPropertyValue<Type>(GetProperty(nativeType, propertyIndex),
                     GetExtendInstance(cPtr));
-                return GetNativeType(type);
+                return type != null ? GetNativeType(type) : IntPtr.Zero;
             }
             catch (Exception e)
             {
@@ -5665,7 +5665,7 @@
         {
             try
             {
-                NativeTypeInfo info = GetNativeTypeInfo(cPtr);
+                NativeTypeInfo info = GetNativeTypeInfo(val);
                 SetPropertyValue<Type>(GetProperty(nativeType, propertyIndex),
                     GetExtendInstance(cPtr), info.Type);
             }
TypePropertyBug.patch (870 bytes)   
Otter

Otter

2024-01-24 08:51

reporter   ~0009112

The patch fixed the bug and now it works as expected, thanks!

Issue History

Date Modified Username Field Change
2024-01-23 17:10 Otter New Issue
2024-01-23 17:46 sfernandez Assigned To => sfernandez
2024-01-23 17:46 sfernandez Status new => assigned
2024-01-23 17:46 sfernandez Target Version => 3.2.3
2024-01-23 17:48 sfernandez Note Added: 0009110
2024-01-23 17:48 sfernandez File Added: TypePropertyBug.patch
2024-01-23 17:48 sfernandez Status assigned => feedback
2024-01-24 08:51 Otter Note Added: 0009112
2024-01-24 08:51 Otter Status feedback => assigned
2024-01-24 10:13 sfernandez Status assigned => resolved
2024-01-24 10:13 sfernandez Resolution open => fixed
2024-01-24 10:13 sfernandez Fixed in Version => 3.2.3
2025-10-10 13:29 jsantos Category Unity3D => Unity