BartekW
Topic Author
Posts: 53
Joined: 24 Mar 2021, 14:33

Base class BaseComponent is ambiguous C++

19 Apr 2021, 16:02

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?
Last edited by BartekW on 19 Apr 2021, 16:40, edited 1 time in total.

Tags:
 
User avatar
jsantos
Site Admin
Posts: 3139
Joined: 20 Jan 2012, 17:18
Contact:

Re: Base class BaseComponent is ambiguous C++

19 Apr 2021, 16:30

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.
 
BartekW
Topic Author
Posts: 53
Joined: 24 Mar 2021, 14:33

Re: Base class BaseComponent is ambiguous C++

20 Apr 2021, 12:23

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 :)

Who is online

Users browsing this forum: Google [Bot] and 1 guest