Unknown property type 'b:Interaction'
hi,
i try to run noesis user control via sdl.
when i try to use <b:Interaction.Triggers> i got error:
Unknown property type 'b:Interaction' (NoesisApp.Interaction) in ../../../../NoesisSDK/Native/Src/Packages/Gui/Core/Src/XamlContext.cpp at line 185
i saw an answer in 2020 that Interactivity classes are an extension that is not part of NoesisGUI is it still relevant?
if so what i need to do to use them?
thanks
i try to run noesis user control via sdl.
when i try to use <b:Interaction.Triggers> i got error:
Unknown property type 'b:Interaction' (NoesisApp.Interaction) in ../../../../NoesisSDK/Native/Src/Packages/Gui/Core/Src/XamlContext.cpp at line 185
i saw an answer in 2020 that Interactivity classes are an extension that is not part of NoesisGUI is it still relevant?
if so what i need to do to use them?
thanks
-
-
sfernandez
Site Admin
- Posts: 3363
- Joined:
Re: Unknown property type 'b:Interaction'
Hello,
Interactivity classes are not included in the core library (Noesis.dll), they are part of the public application framework included in the SDK (the source code is available in Src/Packages/App/Interactivity). You have to include the sources in your application and compile them. And when application starts you have to call NsRegisterReflectionAppInteractivity() along with the rest of components you register.
Please let me know if you find any trouble with it.
Interactivity classes are not included in the core library (Noesis.dll), they are part of the public application framework included in the SDK (the source code is available in Src/Packages/App/Interactivity). You have to include the sources in your application and compile them. And when application starts you have to call NsRegisterReflectionAppInteractivity() along with the rest of components you register.
Code: Select all
extern "C" void NsRegisterReflectionAppInteractivity();Re: Unknown property type 'b:Interaction'
hi,
is there some example which i can look at?
thanks
is there some example which i can look at?
thanks
-
-
sfernandez
Site Admin
- Posts: 3363
- Joined:
Re: Unknown property type 'b:Interaction'
Have you included (copied) in your project the .h and .cpp files available in our Native SDK at Src/Packages/App/Interactivity?
Do you have any trouble compiling them?
Once those compile fine, you should be able to just include the following in your application startup code where the rest of custom components (controls, converters, etc.) are registered:
Do you have any trouble compiling them?
Once those compile fine, you should be able to just include the following in your application startup code where the rest of custom components (controls, converters, etc.) are registered:
Code: Select all
extern "C" void NsRegisterReflectionAppInteractivity();
void RegisterComponents()
{
//RegisterComponent<MyUserControl>();
//and all your custom controls
//...
NsRegisterReflectionAppInteractivity();
}Re: Unknown property type 'b:Interaction'
I am trying to do the same thing and having issues compiling the code on Ubuntu 22.04.
To my CMake file I added:
Without adding anything to the code everything compiles just fine. When adding the following I get a linker error.
To my CMake file I added:
Code: Select all
set(NOESIS_PACKAGE_INTERACTION_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../thirdparty/NoesisGUI/Packages/App/Interactivity)
file(GLOB NOESIS_PACKAGE_INTERACTION_SOURCES
${NOESIS_PACKAGE_INTERACTION_DIR}/Src/*.cpp
${NOESIS_PACKAGE_INTERACTION_DIR}/Src/*.h
${NOESIS_PACKAGE_INTERACTION_DIR}/Include/*.h
)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/../thirdparty/NoesisGUI/Packages/App/Interactivity/Include
${CMAKE_CURRENT_SOURCE_DIR}/../thirdparty/NoesisGUI/Packages/App/MediaElement/Include
)
add_executable(${PROJECT_NAME} ${PROJECT_SOURCES} ${NOESIS_PACKAGE_INTERACTION_SOURCES})Code: Select all
#include <NsCore/RegisterComponent.h>
extern "C" void NsRegisterReflectionAppInteractivity();
namespace NoesisExample {
cExampleScreen::cExampleScreen(...) {
NsRegisterReflectionAppInteractivity();
}
}/usr/bin/ld: CMakeFiles/ExampleScreen.dir/cExampleScreen.cpp.o: in function `NoesisExample::cExampleScreen::cExampleScreen(eScreenId, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/tmp/VC_UI_Screens/ExampleScreen/cExampleScreen.cpp:19: undefined reference to `NsRegisterReflectionAppInteractivity'
collect2: error: ld returned 1 exit status
-
-
sfernandez
Site Admin
- Posts: 3363
- Joined:
Re: Unknown property type 'b:Interaction'
Are you compiling the interactivity classes in a different library where the register method is called? If that is the case you might need to expose a method in that library to register the components.
You can see an example on how we do it in the SDK in the Integration sample: https://github.com/Noesis/Tutorials/blo ... n.cpp#L225
You can see an example on how we do it in the SDK in the Integration sample: https://github.com/Noesis/Tutorials/blo ... n.cpp#L225
Re: Unknown property type 'b:Interaction'
I tried compiling it both in another library and inside the same executable, neither method worked.Are you compiling the interactivity classes in a different library where the register method is called? If that is the case you might need to expose a method in that library to register the components.
You can see an example on how we do it in the SDK in the Integration sample: https://github.com/Noesis/Tutorials/blo ... n.cpp#L225
Re: Unknown property type 'b:Interaction'
does the integration sample mentioned above compile for you? (it is included in the sdk)
That’s a minimal sample where the app framework (including interactivity) is initialized.
That’s a minimal sample where the app framework (including interactivity) is initialized.
Who is online
Users browsing this forum: Bing [Bot] and 8 guests