Page 1 of 1

Base class BaseComponent is ambiguous C++

Posted: 19 Apr 2021, 16:02
by BartekW
Help, I have a class like this:
class testScreen : public NoesisBaseViewModel, public Noesis::UserControl
Where paNoesisBaseViewModel is simply NoesisApp::NotifyPropertyChangedBase
And when I try loadComponent
GUI::LoadComponent(this, "testScreen.xaml");
on keyword this throws an error Base class BaseComponent is ambiguous. I know why but I dont know how to workaround it.

And another question: How to declare and implement refleciton that class? To get acces to controls in xaml I use FindName<T> So if my xaml's class is Menu3D.MainMenu so how it will be look?

Re: Base class BaseComponent is ambiguous C++

Posted: 19 Apr 2021, 16:30
by jsantos
Multiple inheritance is only supported for interfaces. You can't inherit from two concrete classes and use reflection in Noesis, at least by default. The are ways to do it, but you really need to master C++ and Noesis.

Have you considered using the C# API? It gives me the impression that it should be easier in this case.

Re: Base class BaseComponent is ambiguous C++

Posted: 20 Apr 2021, 12:23
by BartekW
Multiple inheritance is only supported for interfaces. You can't inherit from two concrete classes and use reflection in Noesis, at least by default. The are ways to do it, but you really need to master C++ and Noesis.

Have you considered using the C# API? It gives me the impression that it should be easier in this case.
Thanks for reply, I understand, I changed some logic :)