epfor
Topic Author
Posts: 13
Joined: 29 Jun 2024, 22:47

Unknown property type 'b:Interaction'

05 Jul 2024, 11:11

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
 
User avatar
sfernandez
Site Admin
Posts: 3363
Joined: 22 Dec 2011, 19:20

Re: Unknown property type 'b:Interaction'

05 Jul 2024, 12:09

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.
extern "C" void NsRegisterReflectionAppInteractivity();
Please let me know if you find any trouble with it.
 
epfor
Topic Author
Posts: 13
Joined: 29 Jun 2024, 22:47

Re: Unknown property type 'b:Interaction'

08 Jul 2024, 08:53

hi,
is there some example which i can look at?

thanks
 
User avatar
sfernandez
Site Admin
Posts: 3363
Joined: 22 Dec 2011, 19:20

Re: Unknown property type 'b:Interaction'

08 Jul 2024, 13:37

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:
extern "C" void NsRegisterReflectionAppInteractivity();

void RegisterComponents()
{
  //RegisterComponent<MyUserControl>();
  //and all your custom controls
  //...
  NsRegisterReflectionAppInteractivity();
}
 
osama
Posts: 2
Joined: 24 Jun 2024, 09:38

Re: Unknown property type 'b:Interaction'

08 Jul 2024, 16:22

I am trying to do the same thing and having issues compiling the code on Ubuntu 22.04.

To my CMake file I added:
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})
Without adding anything to the code everything compiles just fine. When adding the following I get a linker error.
#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
 
User avatar
sfernandez
Site Admin
Posts: 3363
Joined: 22 Dec 2011, 19:20

Re: Unknown property type 'b:Interaction'

08 Jul 2024, 18:17

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
 
osama
Posts: 2
Joined: 24 Jun 2024, 09:38

Re: Unknown property type 'b:Interaction'

08 Jul 2024, 19:30

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
I tried compiling it both in another library and inside the same executable, neither method worked.
 
User avatar
jsantos
Site Admin
Posts: 4822
Joined: 20 Jan 2012, 17:18
Contact:

Re: Unknown property type 'b:Interaction'

08 Jul 2024, 20:15

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.

Who is online

Users browsing this forum: Bing [Bot] and 8 guests