[Tizen] (A11y) Let we call DetachAccessibleObject only if it is Control 03/304803/2 accepted/tizen/7.0/unified/20240124.164053
authorEunki, Hong <eunkiki.hong@samsung.com>
Wed, 15 Nov 2023 08:44:20 +0000 (17:44 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Wed, 24 Jan 2024 02:11:58 +0000 (11:11 +0900)
NUI.CustomView is subclass of NUI.View, and it will create CustomActor,
which is not a Dali::Toolkit::Control.

In this case, it will throw exception at DevelControl API.

To avoid this cases, let we seperate the cases between Control and non-Control.
And let we ignore for non-control cases.

Change-Id: I87082c77039bb6691cebb18d90341b61b511ba45
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali-csharp-binder/src/nui-view-accessible.cpp

index 7927948..6e71464 100644 (file)
@@ -733,12 +733,12 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Accessibility_SetAccessibilityDelegate(c
   }));
 }
 
-SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Accessibility_DetachAccessibleObject(Dali::Toolkit::Control* arg1_control)
+SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Accessibility_DetachAccessibleObject(Dali::BaseHandle* arg1_control)
 {
   GUARD_ON_NULL_RET(arg1_control);
 
   try_catch(([&]() {
-    Dali::Toolkit::Control control = *arg1_control;
+    Dali::Toolkit::Control control = Dali::Toolkit::Control::DownCast(*arg1_control);
     if(DALI_LIKELY(control))
     {
       // Call detach only if accessible was created before.