Skip to content

Exception on wrapper cast #60

@Hellfim

Description

@Hellfim

InvalidCastException: Specified cast is not valid.
UnityMvvmToolkit.Core.Internal.ObjectWrappers.PropertyWrapper`2[TSource,TValue].SetProperty (UnityMvvmToolkit.Core.Interfaces.IBaseProperty property) (at ./Library/PackageCache/com.chebanovdd.unitymvvmtoolkit@1.1.8/Runtime/Core/Internal/ObjectWrappers/PropertyWrapper.TSource.TValue.cs:56)
UnityMvvmToolkit.Core.Internal.ObjectHandlers.ObjectWrapperHandler.GetProperty[TProperty,TValueType] (UnityMvvmToolkit.Core.Interfaces.IBindingContext context, UnityMvvmToolkit.Core.BindingData bindingData, System.Reflection.MemberInfo memberInfo) (at ./Library/PackageCache/com.chebanovdd.unitymvvmtoolkit@1.1.8/Runtime/Core/Internal/ObjectHandlers/ObjectWrapperHandler.cs:123)
UnityMvvmToolkit.Core.BindingContextObjectProvider.GetProperty[TProperty,TValueType] (UnityMvvmToolkit.Core.Interfaces.IBindingContext context, UnityMvvmToolkit.Core.BindingData bindingData) (at ./Library/PackageCache/com.chebanovdd.unitymvvmtoolkit@1.1.8/Runtime/Core/BindingContextObjectProvider.cs:208)
UnityMvvmToolkit.Core.BindingContextObjectProvider.RentReadOnlyProperty[TValueType] (UnityMvvmToolkit.Core.Interfaces.IBindingContext context, UnityMvvmToolkit.Core.PropertyBindingData bindingData) (at ./Library/PackageCache/com.chebanovdd.unitymvvmtoolkit@1.1.8/Runtime/Core/BindingContextObjectProvider.cs:132)
MVVMExtensions.BindingContextObjectProviderWithCustomTemplates.RentReadOnlyProperty[TValueType] (UnityMvvmToolkit.Core.Interfaces.IBindingContext context, UnityMvvmToolkit.Core.PropertyBindingData bindingData) (at Assets/Scripts/MVVMExtensions/BindingContextObjectProviderWithCustomTemplates.cs:79)
UnityMvvmToolkit.UITK.BindableUIElements.BindableLabel.SetBindingContext (UnityMvvmToolkit.Core.Interfaces.IBindingContext context, UnityMvvmToolkit.Core.Interfaces.IObjectProvider objectProvider) (at ./Library/PackageCache/com.chebanovdd.unitymvvmtoolkit@1.1.8/Runtime/UITK/BindableUIElements/BindableLabel.cs:23)

ObjectWrapperHandler provides incorrect wrappers if normal and readonly properties are used

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions