Problem with DependencyProperty (Help)
Posted: 07 Dec 2018, 10:56
I want use DependencyProperty, everything looks OK, I copy my old code from old project which was working without problems, I only change the class and naming of objects.
here is code which make trouble: (If I coment problematic code, project is compiled without error and is running ok), I tried Beta4 or 2.1 final, same error
When I compile, it throw this:
here is code which make trouble: (If I coment problematic code, project is compiled without error and is running ok), I tried Beta4 or 2.1 final, same error
Code: Select all
NS_IMPLEMENT_INLINE_REFLECTION(grid_UrhoControl, Noesis::UserControl)
{
NsMeta<Noesis::TypeId>("SumpleUI.grid_UrhoControl");
Noesis::Ptr<Noesis::UIElementData> data = NsMeta<Noesis::UIElementData>(Noesis::TypeOf<SelfClass>()); // !!! this throw error
/*data->RegisterProperty<bool>(b_IsChecked_LightsProperty, "b_IsChecked_Lights",
Noesis::FrameworkPropertyMetadata::Create());*/
}
Code: Select all
Severity Code Description Project File Line Suppression State
Error C2440 'initializing': cannot convert from 'T *' to 'Noesis::Ptr<Noesis::UIElementData>' U3D Noesis Console DX d:\... \grid_urhocontrol.h 59
Code: Select all
1>grid_UrhoControl.cpp
1>d:\...\urho3d test 2018\u3d noesis console dx\grid_urhocontrol.h(59): error C2440: 'initializing': cannot convert from 'T *' to 'Noesis::Ptr<Noesis::UIElementData>'
1> with
1> [
1> T=Noesis::UIElementData
1> ]
1>d:\...\u3d noesis console dx\grid_urhocontrol.h(59): note: Constructor for class 'Noesis::Ptr<Noesis::UIElementData>' is declared 'explicit'
1>d:\programi\development\noesis-gui\noesisgui-nativesdk-2.2.0b4\include\nscore\typeclasscreator.inl(38): note: see reference to function template instantiation 'void grid_UrhoControl::StaticFillClassType<void>(Noesis::TypeClassCreator &)' being compiled
1>d:\...\urho3d test 2018\u3d noesis console dx\grid_urhocontrol.h(56): note: see reference to function template instantiation 'void Noesis::TypeClassCreator::Fill<grid_UrhoControl::SelfClass,grid_UrhoControl::ParentClass>(Noesis::Type *)' being compiled
1>MainWindow.cpp
1>d:\...\games\urho3d test 2018\u3d noesis console dx\grid_urhocontrol.h(59): error C2440: 'initializing': cannot convert from 'T *' to 'Noesis::Ptr<Noesis::UIElementData>'
1> with
1> [
1> T=Noesis::UIElementData
1> ]
1>d:\...\urho3d test 2018\u3d noesis console dx\grid_urhocontrol.h(59): note: Constructor for class 'Noesis::Ptr<Noesis::UIElementData>' is declared 'explicit'
1>d:\programi\development\noesis-gui\noesisgui-nativesdk-2.2.0b4\include\nscore\typeclasscreator.inl(38): note: see reference to function template instantiation 'void grid_UrhoControl::StaticFillClassType<void>(Noesis::TypeClassCreator &)' being compiled
1>d:\...\urho3d test 2018\u3d noesis console dx\grid_urhocontrol.h(56): note: see reference to function template instantiation 'void Noesis::TypeClassCreator::Fill<grid_UrhoControl::SelfClass,grid_UrhoControl::ParentClass>(Noesis::Type *)' being compiled