fix PreFocusChange signal count error
authordongsug.song <dongsug.song@samsung.com>
Wed, 5 Apr 2017 04:33:10 +0000 (13:33 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Wed, 5 Apr 2017 05:03:03 +0000 (14:03 +0900)
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
Change-Id: If7b91770fb15c611cdde273b8b068b727a89b0d7

22 files changed:
NUISamples/NUISamples/NUISamples.TizenTV/examples/dali-test.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/flex-container.cs
src/Tizen.NUI/Tizen.NUI.csproj
src/Tizen.NUI/src/internal/CustomAlgorithmInterface.cs
src/Tizen.NUI/src/internal/PropertyRangeManager.cs
src/Tizen.NUI/src/internal/ViewImpl.cs
src/Tizen.NUI/src/internal/ViewRegistry.cs
src/Tizen.NUI/src/public/Animation.cs
src/Tizen.NUI/src/public/Button.cs
src/Tizen.NUI/src/public/FocusManager.cs
src/Tizen.NUI/src/public/Popup.cs
src/Tizen.NUI/src/public/ProgressBar.cs
src/Tizen.NUI/src/public/ScrollBar.cs
src/Tizen.NUI/src/public/Slider.cs
src/Tizen.NUI/src/public/Stage.cs
src/Tizen.NUI/src/public/StyleManager.cs
src/Tizen.NUI/src/public/TextEditor.cs
src/Tizen.NUI/src/public/TextField.cs
src/Tizen.NUI/src/public/Timer.cs
src/Tizen.NUI/src/public/VideoView.cs
src/Tizen.NUI/src/public/View.cs
src/Tizen.NUI/src/public/Window.cs

index 706185b018b20b8cca9791371b176b1ae72f003b..2fb9920515ab09dddaf85b4ce4d9bbf19761d059 100755 (executable)
@@ -116,6 +116,8 @@ namespace DaliTest
 
         public void Initialize()
         {
+            DowncastTest();
+
             NavigationPropertiesTests();
 
             OperatorTests();
@@ -705,6 +707,48 @@ namespace DaliTest
           }
         }
 
+
+
+        public void DowncastTest()
+        {
+            //Create a View as a child of parent View, get it use parent.GetChildAt(i), then DownCast to View handle, but call BackgroundColor property will crash.
+            View parent = new View();
+            View[] childs = new View[5];
+
+            for (int i = 0; i < 5; i++)
+            {
+                childs[i] = new View();
+                childs[i].Name = "child_view_" + i;
+                childs[i].BackgroundColor = Color.Red;
+                parent.Add(childs[i]);
+            }
+
+            for (uint i = 0; i < parent.GetChildCount(); i++)
+            {
+                Actor child = parent.GetChildAt(i);
+                View childView = View.DownCast<View>(child);
+                if (childView)
+                {
+                    Tizen.Log.Debug("NUI", "Type[" + childView.GetTypeName() + "] BGColor[" + childView.BackgroundColor.R + "]" + " Name[" + childView.Name + "]");
+                }
+            }
+
+            PushButton button = new PushButton();
+            button.LabelText = "ButtonTest!";
+            button.BackgroundColor = Color.White;
+            View parentView = new View();
+            parentView.Add(button);
+            PushButton view = PushButton.DownCast(parentView.GetChildAt(0));
+            if (view)
+            {
+                Tizen.Log.Debug("NUI", "NUI view GetTypeName= " + view.GetTypeName());
+                Tizen.Log.Debug("NUI", "NUI view LabelText= " + view.LabelText);
+                Tizen.Log.Debug("NUI", "NUI view color= " +  view.BackgroundColor.R);
+            }
+        }
+
+
+
         /// <summary>
         /// The main entry point for the application.
         /// </summary>
index accbf0cd1500ec5761723d73f1975d83beb2a11f..0f82468b8a828d9e59c2cd0acc31e91830408d2e 100755 (executable)
@@ -95,6 +95,7 @@ namespace FlexContainerTest
                 Tizen.Log.Debug("NUI", "pushbutton1 clicked! add handler!");
                 _cnt++;
                 FocusManager.Instance.PreFocusChange += Instance_PreFocusChange;
+                _ani.Finished += _ani_Finished;
                 pushButton1.LabelText = "Add Handler" + _cnt;
                 pushButton2.LabelText = "Remove Handler" + _cnt;
                 return true;
@@ -112,6 +113,7 @@ namespace FlexContainerTest
                 Tizen.Log.Debug("NUI", "pushbutton2 clicked! remove handler!");
                 _cnt--;
                 FocusManager.Instance.PreFocusChange -= Instance_PreFocusChange;
+                _ani.Finished -= _ani_Finished;
                 pushButton1.LabelText = "Add Handler" + _cnt;
                 pushButton2.LabelText = "Remove Handler" + _cnt;
                 return true;
@@ -123,9 +125,15 @@ namespace FlexContainerTest
             _ani.AnimateTo(pushButton1, "Opacity", 0.0f);
             _ani.AnimateTo(pushButton2, "Opacity", 0.0f);
             _ani.EndAction = Animation.EndActions.Discard;
+            _ani.Finished += _ani_Finished;
 
         }
 
+        private void _ani_Finished(object sender, EventArgs e)
+        {
+            Tizen.Log.Debug("NUI", "_ani finished! _cnt=" + _cnt);
+        }
+
         private View Instance_PreFocusChange(object source, FocusManager.PreFocusChangeEventArgs e)
         {
             View nextView;
index 602db247a9cb8e06acfca29cf651e32b53089a8a..b9f10b41c8d2801e920f21ee78d13c452be11ba7 100755 (executable)
@@ -29,7 +29,7 @@
     <DebugType>full</DebugType>\r
     <Optimize>false</Optimize>\r
     <OutputPath>bin\Debug\</OutputPath>\r
-    <DefineConstants>DEBUG;TRACE</DefineConstants>\r
+    <DefineConstants>TRACE;DEBUG;DEBUG_ON;DOT_NET_CORE</DefineConstants>\r
     <ErrorReport>prompt</ErrorReport>\r
     <WarningLevel>4</WarningLevel>\r
   </PropertyGroup>\r
index fd51ec5602128252b36a77adfc79ef7cf5d3c726..4ac3920feb6480c8511dc100939b2a0d0c442886 100755 (executable)
@@ -7,8 +7,8 @@
 // Do not make changes to this file unless you know what you are doing--modify
 // the SWIG interface file instead.
 //------------------------------------------------------------------------------
-#define DOT_NET_CORE
 
+#define DOT_NET_CORE
 #if (DOT_NET_CORE)
 using System.Reflection;
 #endif
index 7560286822a77a829ea5ab6519895649d2555369..e4fcf4a68da07f4163bb4c068745283e6323a3e1 100755 (executable)
@@ -1,11 +1,11 @@
-#define DOT_NET_CORE
 
-using System;
-using System.Runtime.InteropServices;
-using System.Collections.Generic;
+#define DOT_NET_CORE
 #if (DOT_NET_CORE)
 using System.Reflection;
 #endif
+using System;
+using System.Runtime.InteropServices;
+using System.Collections.Generic;
 
 namespace Tizen.NUI
 {
index 9aebd4053c74a4591542cfdc2e5b963fe2087e40..e11ab3a2a56f18eea008a2b8f6dad60390934ab1 100755 (executable)
@@ -7,8 +7,8 @@
 // Do not make changes to this file unless you know what you are doing--modify
 // the SWIG interface file instead.
 //------------------------------------------------------------------------------
-#define DOT_NET_CORE
 
+#define DOT_NET_CORE
 #if (DOT_NET_CORE)
 using System.Reflection;
 #endif
index ee3cc038ec902d379c0669d9eef32068acb87da3..a1bf0cde2ea9f4dbf8ad23dd52fb915e0f3d332f 100755 (executable)
@@ -1,11 +1,11 @@
-#define DOT_NET_CORE
 
-using System;
-using System.Runtime.InteropServices;
-using System.Collections.Generic;
+#define DOT_NET_CORE
 #if (DOT_NET_CORE)
 using System.Reflection;
 #endif
+using System;
+using System.Runtime.InteropServices;
+using System.Collections.Generic;
 
 namespace Tizen.NUI
 {
index 29bfffd51821520c0fafd16cb909deb5d72dbf93..7cbcb66e80cb05085ce7782d9d58595f605f1cc1 100755 (executable)
@@ -102,8 +102,16 @@ namespace Tizen.NUI
             {
                 if (_animationFinishedEventHandler == null)
                 {
+#if DEBUG_ON
+                    Tizen.Log.Debug("NUI", "con1) FinishedSignal().Empty = " + FinishedSignal().Empty());
+                    Tizen.Log.Debug("NUI", "con2) FinishedSignal().GetConnectionCount = " + FinishedSignal().GetConnectionCount());
+#endif
                     _animationFinishedEventCallback = OnFinished;
                     FinishedSignal().Connect(_animationFinishedEventCallback);
+#if DEBUG_ON
+                    Tizen.Log.Debug("NUI", "con3) FinishedSignal().Empty = " + FinishedSignal().Empty());
+                    Tizen.Log.Debug("NUI", "con4) FinishedSignal().GetConnectionCount = " + FinishedSignal().GetConnectionCount());
+#endif
                 }
 
                 _animationFinishedEventHandler += value;
@@ -112,9 +120,17 @@ namespace Tizen.NUI
             {
                 _animationFinishedEventHandler -= value;
 
-                if (_animationFinishedEventHandler == null && _animationFinishedEventCallback != null)
+                if (_animationFinishedEventHandler == null && FinishedSignal().Empty() == false)
                 {
+#if DEBUG_ON
+                    Tizen.Log.Debug("NUI", "discon1) FinishedSignal().Empty = " + FinishedSignal().Empty());
+                    Tizen.Log.Debug("NUI", "discon2) FinishedSignal().GetConnectionCount = " + FinishedSignal().GetConnectionCount());
+#endif
                     FinishedSignal().Disconnect(_animationFinishedEventCallback);
+#if DEBUG_ON
+                    Tizen.Log.Debug("NUI", "discon3) FinishedSignal().Empty = " + FinishedSignal().Empty());
+                    Tizen.Log.Debug("NUI", "discon4) FinishedSignal().GetConnectionCount = " + FinishedSignal().GetConnectionCount());
+#endif
                 }
             }
         }
index d1bb50c557f295a3c2935726d368338a63f43c78..e77193374c588e5dcfa4f33616a89c510f730150 100755 (executable)
@@ -104,7 +104,7 @@ namespace Tizen.NUI
             {
                 _clickedEventHandler -= value;
 
-                if (_clickedEventHandler == null && _clickedCallback != null)
+                if (_clickedEventHandler == null && ClickedSignal().Empty() == false)
                 {
                     ClickedSignal().Disconnect(_clickedCallback);
                 }
@@ -145,7 +145,7 @@ namespace Tizen.NUI
             {
                 _pressedEventHandler -= value;
 
-                if (_pressedEventHandler == null && _pressedCallback != null)
+                if (_pressedEventHandler == null && PressedSignal().Empty() == false)
                 {
                     this.PressedSignal().Disconnect(_pressedCallback);
                 }
@@ -184,7 +184,7 @@ namespace Tizen.NUI
             {
                 _releasedEventHandler -= value;
 
-                if (_releasedEventHandler == null && _releasedCallback != null)
+                if (_releasedEventHandler == null && ReleasedSignal().Empty() == false)
                 {
                     ReleasedSignal().Disconnect(_releasedCallback);
                 }
@@ -224,7 +224,7 @@ namespace Tizen.NUI
             {
                 _stateChangedEventHandler -= value;
 
-                if (_stateChangedEventHandler == null && _stateChangedCallback != null)
+                if (_stateChangedEventHandler == null && StateChangedSignal().Empty() == false)
                 {
                     StateChangedSignal().Disconnect(_stateChangedCallback);
                 }
index 2d4e4aa603c55a63621136df9bd722aee53a2ace..fd5f9ffa967aba7057de29461e4352efae215ed5 100755 (executable)
@@ -133,17 +133,33 @@ namespace Tizen.NUI
             {
                 if (_preFocusChangeEventHandler == null)
                 {
+#if DEBUG_ON
+                    Tizen.Log.Debug("NUI", "con1) PreFocusChangeSignal().Empty = " + PreFocusChangeSignal().Empty());
+                    Tizen.Log.Debug("NUI", "con2) PreFocusChangeSignal().GetConnectionCount = " + PreFocusChangeSignal().GetConnectionCount());
+#endif
                     _preFocusChangeCallback = OnPreFocusChange;
                     PreFocusChangeSignal().Connect(_preFocusChangeCallback);
+#if DEBUG_ON
+                    Tizen.Log.Debug("NUI", "con3) PreFocusChangeSignal().Empty = " + PreFocusChangeSignal().Empty());
+                    Tizen.Log.Debug("NUI", "con4) PreFocusChangeSignal().GetConnectionCount = " + PreFocusChangeSignal().GetConnectionCount());
+#endif
                 }
                 _preFocusChangeEventHandler += value;
             }
             remove
             {
                 _preFocusChangeEventHandler -= value;
-                if (_preFocusChangeEventHandler == null && _preFocusChangeCallback != null)
+                if (_preFocusChangeEventHandler == null && PreFocusChangeSignal().Empty() == false)
                 {
+#if DEBUG_ON
+                    Tizen.Log.Debug("NUI", "discon1) PreFocusChangeSignal().Empty = " + PreFocusChangeSignal().Empty());
+                    Tizen.Log.Debug("NUI", "discon2) PreFocusChangeSignal().GetConnectionCount = " + PreFocusChangeSignal().GetConnectionCount());
+#endif
                     PreFocusChangeSignal().Disconnect(_preFocusChangeCallback);
+#if DEBUG_ON
+                    Tizen.Log.Debug("NUI", "discon3) PreFocusChangeSignal().Empty = " + PreFocusChangeSignal().Empty());
+                    Tizen.Log.Debug("NUI", "discon4) PreFocusChangeSignal().GetConnectionCount = " + PreFocusChangeSignal().GetConnectionCount());
+#endif
                 }
             }
         }
@@ -226,7 +242,7 @@ namespace Tizen.NUI
             {
                 _focusChangedEventHandler -= value;
 
-                if (_focusChangedEventCallback == null && _focusChangedEventCallback != null)
+                if (_focusChangedEventCallback == null && FocusChangedSignal().Empty() == false)
                 {
                     FocusChangedSignal().Disconnect(_focusChangedEventCallback);
                 }
@@ -299,7 +315,7 @@ namespace Tizen.NUI
             {
                 _focusGroupChangedEventHandler -= value;
 
-                if (_focusGroupChangedEventCallback == null && _focusGroupChangedEventCallback != null)
+                if (_focusGroupChangedEventCallback == null && FocusGroupChangedSignal().Empty() == false)
                 {
                     FocusGroupChangedSignal().Disconnect(_focusGroupChangedEventCallback);
                 }
@@ -359,7 +375,7 @@ namespace Tizen.NUI
             {
                 _focusedViewEnterKeyEventHandler -= value;
 
-                if (_focusedViewEnterKeyEventCallback == null && _focusedViewEnterKeyEventCallback != null)
+                if (_focusedViewEnterKeyEventCallback == null && FocusedActorEnterKeySignal().Empty() == false)
                 {
                     FocusedActorEnterKeySignal().Disconnect(_focusedViewEnterKeyEventCallback);
                 }
@@ -532,7 +548,8 @@ namespace Tizen.NUI
             return ret;
         }
 
-        public void SetCustomAlgorithm(ICustomFocusAlgorithm arg0) {
+        public void SetCustomAlgorithm(ICustomFocusAlgorithm arg0)
+        {
             _customAlgorithmInterfaceWrapper = new CustomAlgorithmInterfaceWrapper();
             _customAlgorithmInterfaceWrapper.SetFocusAlgorithm(arg0);
 
index 78953e5b45b6de6a47bda48a25a0d739c00f0b51..99c4cb249dfcaab4422dc682945c4dc8121b2133 100755 (executable)
@@ -156,7 +156,7 @@ namespace Tizen.NUI
             remove
             {
                 _popUpOutsideTouchedEventHandler -= value;
-                if (_popUpOutsideTouchedEventHandler == null && _popUpOutsideTouchedEventCallbackDelegate != null)
+                if (_popUpOutsideTouchedEventHandler == null && OutsideTouchedSignal().Empty() == false)
                 {
                     this.OutsideTouchedSignal().Disconnect(_popUpOutsideTouchedEventCallbackDelegate);
                 }
@@ -192,7 +192,7 @@ namespace Tizen.NUI
             remove
             {
                 _popUpShowingEventHandler -= value;
-                if (_popUpShowingEventHandler == null && _popUpShowingEventCallbackDelegate != null)
+                if (_popUpShowingEventHandler == null && ShowingSignal().Empty() == false)
                 {
                     ShowingSignal().Disconnect(_popUpShowingEventCallbackDelegate);
                 }
@@ -229,7 +229,7 @@ namespace Tizen.NUI
             remove
             {
                 _popUpShownEventHandler -= value;
-                if (_popUpShownEventHandler == null && _popUpShownEventCallbackDelegate != null)
+                if (_popUpShownEventHandler == null && ShownSignal().Empty() == false)
                 {
                     ShownSignal().Disconnect(_popUpShownEventCallbackDelegate);
                 }
@@ -265,7 +265,7 @@ namespace Tizen.NUI
             remove
             {
                 _popUpHidingEventHandler -= value;
-                if (_popUpHidingEventHandler == null && _popUpHidingEventCallbackDelegate != null)
+                if (_popUpHidingEventHandler == null && HidingSignal().Empty() == false)
                 {
                     HidingSignal().Disconnect(_popUpHidingEventCallbackDelegate);
                 }
@@ -301,7 +301,7 @@ namespace Tizen.NUI
             remove
             {
                 _popUpHiddenEventHandler -= value;
-                if (_popUpHiddenEventHandler == null && _popUpHiddenEventCallbackDelegate != null)
+                if (_popUpHiddenEventHandler == null && HiddenSignal().Empty() == false)
                 {
                     HiddenSignal().Disconnect(_popUpHiddenEventCallbackDelegate);
                 }
index 2c7353c362f56c4d0f11d1c29ebc48749b5529cc..63f49645022736faa4761d3ac0407131fc51c1dc 100755 (executable)
@@ -148,7 +148,7 @@ namespace Tizen.NUI
             remove
             {
                 _progressBarValueChangedEventHandler -= value;
-                if (_progressBarValueChangedEventHandler == null && _progressBarValueChangedCallbackDelegate != null)
+                if (_progressBarValueChangedEventHandler == null && ValueChangedSignal().Empty() == false)
                 {
                     ValueChangedSignal().Disconnect(_progressBarValueChangedCallbackDelegate);
                 }
index 0324903cecdae6bbb1b65daeea12a56925ed5c58..cb8aed6f756447eb19531ed839f1813833f633ff 100755 (executable)
@@ -134,7 +134,7 @@ namespace Tizen.NUI
             remove
             {
                 _scrollBarPanFinishedEventHandler -= value;
-                if (_scrollBarPanFinishedEventHandler == null && _scrollBarPanFinishedEventCallbackDelegate != null)
+                if (_scrollBarPanFinishedEventHandler == null && PanFinishedSignal().Empty() == false)
                 {
                     PanFinishedSignal().Disconnect(_scrollBarPanFinishedEventCallbackDelegate);
                 }
@@ -171,7 +171,7 @@ namespace Tizen.NUI
             remove
             {
                 _scrollBarScrollPositionIntervalReachedEventHandler -= value;
-                if (_scrollBarScrollPositionIntervalReachedEventHandler == null && _scrollBarScrollPositionIntervalReachedEventCallbackDelegate != null)
+                if (_scrollBarScrollPositionIntervalReachedEventHandler == null && ScrollPositionIntervalReachedSignal().Empty() == false)
                 {
                     ScrollPositionIntervalReachedSignal().Disconnect(_scrollBarScrollPositionIntervalReachedEventCallbackDelegate);
                 }
index 06ba9975c3a59130286bbc6dda02e03bc1816cc1..31ea4ee3d4919d04b49f2845e29ca07a19cbd9e3 100755 (executable)
@@ -231,7 +231,7 @@ namespace Tizen.NUI
             remove
             {
                 _sliderValueChangedEventHandler -= value;
-                if (_sliderValueChangedEventHandler == null && _sliderValueChangedCallbackDelegate != null)
+                if (_sliderValueChangedEventHandler == null && ValueChangedSignal().Empty() == false)
                 {
                     ValueChangedSignal().Disconnect(_sliderValueChangedCallbackDelegate);
                 }
@@ -272,7 +272,7 @@ namespace Tizen.NUI
             remove
             {
                 _sliderSlidingFinishedEventHandler -= value;
-                if (_sliderSlidingFinishedEventHandler == null && _sliderSlidingFinishedCallbackDelegate != null)
+                if (_sliderSlidingFinishedEventHandler == null && SlidingFinishedSignal().Empty() == false)
                 {
                     SlidingFinishedSignal().Disconnect(_sliderSlidingFinishedCallbackDelegate);
                 }
@@ -313,7 +313,7 @@ namespace Tizen.NUI
             remove
             {
                 _sliderMarkReachedEventHandler -= value;
-                if (_sliderMarkReachedEventHandler == null && _sliderMarkReachedCallbackDelegate != null)
+                if (_sliderMarkReachedEventHandler == null && MarkReachedSignal().Empty() == false)
                 {
                     MarkReachedSignal().Disconnect(_sliderMarkReachedCallbackDelegate);
                 }
index 727c72407c4e0f9fc33a15cf378b4d8ccb335ba4..6e9e69d45e2f59ebd11abd7dc2dab1f6b813469f 100755 (executable)
@@ -116,7 +116,7 @@ namespace Tizen.NUI
             remove
             {
                 _stageTouchHandler -= value;
-                if (_stageTouchHandler == null && _stageTouchCallbackDelegate != null)
+                if (_stageTouchHandler == null && TouchSignal().Empty() == false)
                 {
                     TouchSignal().Disconnect(_stageTouchCallbackDelegate);
                 }
@@ -181,7 +181,7 @@ namespace Tizen.NUI
             remove
             {
                 _stageWheelHandler -= value;
-                if (_stageWheelHandler == null && _stageWheelCallbackDelegate != null)
+                if (_stageWheelHandler == null && WheelEventSignal().Empty() == false)
                 {
                     WheelEventSignal().Disconnect(_stageWheelCallbackDelegate);
                 }
@@ -246,7 +246,7 @@ namespace Tizen.NUI
             remove
             {
                 _stageKeyHandler -= value;
-                if (_stageKeyHandler == null && _stageKeyCallbackDelegate != null)
+                if (_stageKeyHandler == null && KeyEventSignal().Empty() == false)
                 {
                     KeyEventSignal().Disconnect(_stageKeyCallbackDelegate);
                 }
@@ -289,7 +289,7 @@ namespace Tizen.NUI
             remove
             {
                 _stageEventProcessingFinishedEventHandler -= value;
-                if (_stageEventProcessingFinishedEventHandler == null && _stageEventProcessingFinishedEventCallbackDelegate != null)
+                if (_stageEventProcessingFinishedEventHandler == null && EventProcessingFinishedSignal().Empty() == false)
                 {
                     EventProcessingFinishedSignal().Disconnect(_stageEventProcessingFinishedEventCallbackDelegate);
                 }
@@ -323,7 +323,7 @@ namespace Tizen.NUI
             remove
             {
                 _stageContextLostEventHandler -= value;
-                if (_stageContextLostEventHandler == null && _stageContextLostEventCallbackDelegate != null)
+                if (_stageContextLostEventHandler == null && ContextLostSignal().Empty() == false)
                 {
                     ContextLostSignal().Disconnect(_stageContextLostEventCallbackDelegate);
                 }
@@ -357,7 +357,7 @@ namespace Tizen.NUI
             remove
             {
                 _stageContextRegainedEventHandler -= value;
-                if (_stageContextRegainedEventHandler == null && _stageContextRegainedEventCallbackDelegate != null)
+                if (_stageContextRegainedEventHandler == null && ContextRegainedSignal().Empty() == false)
                 {
                     this.ContextRegainedSignal().Disconnect(_stageContextRegainedEventCallbackDelegate);
                 }
@@ -391,7 +391,7 @@ namespace Tizen.NUI
             remove
             {
                 _stageSceneCreatedEventHandler -= value;
-                if (_stageSceneCreatedEventHandler == null && _stageSceneCreatedEventCallbackDelegate != null)
+                if (_stageSceneCreatedEventHandler == null && SceneCreatedSignal().Empty() == false)
                 {
                     SceneCreatedSignal().Disconnect(_stageSceneCreatedEventCallbackDelegate);
                 }
index 17ac80ea5a246e6785fd9e86108888b400f1dcfd..68fcb9b85f9c9ac488d9930d371241f6be2764d8 100755 (executable)
@@ -139,7 +139,7 @@ namespace Tizen.NUI
             remove
             {
                 _styleManagerStyleChangedEventHandler -= value;
-                if (_styleManagerStyleChangedEventHandler == null && _styleManagerStyleChangedCallbackDelegate != null)
+                if (_styleManagerStyleChangedEventHandler == null && StyleChangedSignal().Empty() == false)
                 {
                     StyleChangedSignal().Disconnect(_styleManagerStyleChangedCallbackDelegate);
                 }
index ceb83b1d519db7d079831dd90c220b1f591cfbf5..6161aea5fcf82ce53958bc07fd9ed1db7deaaeee 100755 (executable)
@@ -127,7 +127,7 @@ namespace Tizen.NUI
             remove
             {
                 _textEditorTextChangedEventHandler -= value;
-                if (_textEditorTextChangedEventHandler == null && _textEditorTextChangedCallbackDelegate != null)
+                if (_textEditorTextChangedEventHandler == null && TextChangedSignal().Empty() == false)
                 {
                     TextChangedSignal().Disconnect(_textEditorTextChangedCallbackDelegate);
                 }
index a81f554dd2eee740e18fa20953b75ede40d727b3..f6f0496c0ac514a34bb484b1977e02ef922a1b08 100755 (executable)
@@ -153,7 +153,7 @@ namespace Tizen.NUI
             remove
             {
                 _textFieldTextChangedEventHandler -= value;
-                if (_textFieldTextChangedEventHandler == null && _textFieldTextChangedCallbackDelegate != null)
+                if (_textFieldTextChangedEventHandler == null && TextChangedSignal().Empty() == false)
                 {
                     TextChangedSignal().Disconnect(_textFieldTextChangedCallbackDelegate);
                 }
@@ -191,7 +191,7 @@ namespace Tizen.NUI
             }
             remove
             {
-                if (_textFieldMaxLengthReachedEventHandler == null && _textFieldMaxLengthReachedCallbackDelegate != null)
+                if (_textFieldMaxLengthReachedEventHandler == null && MaxLengthReachedSignal().Empty() == false)
                 {
                     this.MaxLengthReachedSignal().Disconnect(_textFieldMaxLengthReachedCallbackDelegate);
                 }
index fbe2abe6f7fd8220decafded2422260ec040239c..89e2869ddb7027d5fa29eafd510471e98452e924 100755 (executable)
@@ -115,7 +115,7 @@ namespace Tizen.NUI
             remove
             {
                 _timerTickEventHandler -= value;
-                if (_timerTickEventHandler == null && _timerTickCallbackDelegate != null)
+                if (_timerTickEventHandler == null && TickSignal().Empty() == false)
                 {
                     TickSignal().Disconnect(_timerTickCallbackDelegate);
                 }
index b8dfa97afaf1cdbc5add0fcfc3cb4203d50419f8..74a5678442c863becbeb74c37c75d0da1d9f67a9 100755 (executable)
@@ -125,7 +125,7 @@ namespace Tizen.NUI
             remove
             {
                 _videoViewFinishedEventHandler -= value;
-                if (_videoViewFinishedEventHandler == null && _videoViewFinishedCallbackDelegate != null)
+                if (_videoViewFinishedEventHandler == null && FinishedSignal().Empty() == false)
                 {
                     FinishedSignal().Disconnect(_videoViewFinishedCallbackDelegate);
                 }
index ad34b102f09d4a4f07b7ecc74349797926e9ac5b..e877f2e60e7ea106c4237516dc6da473e5a455a5 100755 (executable)
@@ -104,7 +104,7 @@ namespace Tizen.NUI
             {
                 _keyInputFocusGainedEventHandler -= value;
 
-                if (_keyInputFocusGainedEventHandler == null && _keyInputFocusGainedCallback != null)
+                if (_keyInputFocusGainedEventHandler == null && KeyInputFocusGainedSignal().Empty() == false)
                 {
                     this.KeyInputFocusGainedSignal().Disconnect(_keyInputFocusGainedCallback);
                 }
@@ -146,7 +146,7 @@ namespace Tizen.NUI
             {
                 _keyInputFocusLostEventHandler -= value;
 
-                if (_keyInputFocusLostEventHandler == null && _keyInputFocusLostCallback != null)
+                if (_keyInputFocusLostEventHandler == null && KeyInputFocusLostSignal().Empty() == false)
                 {
                     this.KeyInputFocusLostSignal().Disconnect(_keyInputFocusLostCallback);
                 }
@@ -213,7 +213,7 @@ namespace Tizen.NUI
             {
                 _keyEventHandler -= value;
 
-                if (_keyEventHandler == null && _keyCallback != null)
+                if (_keyEventHandler == null && KeyEventSignal().Empty() == false)
                 {
                     this.KeyEventSignal().Disconnect(_keyCallback);
                 }
@@ -260,7 +260,7 @@ namespace Tizen.NUI
             {
                 _onRelayoutEventHandler -= value;
 
-                if (_onRelayoutEventHandler == null && _onRelayoutEventCallback != null)
+                if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false)
                 {
                     this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback);
                 }
@@ -329,7 +329,7 @@ namespace Tizen.NUI
             {
                 _touchDataEventHandler -= value;
 
-                if (_touchDataEventHandler == null && _touchDataCallback != null)
+                if (_touchDataEventHandler == null && TouchSignal().Empty() == false)
                 {
                     this.TouchSignal().Disconnect(_touchDataCallback);
                 }
@@ -403,7 +403,7 @@ namespace Tizen.NUI
             {
                 _hoverEventHandler -= value;
 
-                if (_hoverEventHandler == null && _hoverEventCallback != null)
+                if (_hoverEventHandler == null && HoveredSignal().Empty() == false)
                 {
                     this.HoveredSignal().Disconnect(_hoverEventCallback);
                 }
@@ -476,7 +476,7 @@ namespace Tizen.NUI
             {
                 _wheelEventHandler -= value;
 
-                if (_wheelEventHandler == null && _wheelEventCallback != null)
+                if (_wheelEventHandler == null && WheelEventSignal().Empty() == false)
                 {
                     this.WheelEventSignal().Disconnect(_wheelEventCallback);
                 }
@@ -525,7 +525,7 @@ namespace Tizen.NUI
             {
                 _onStageEventHandler -= value;
 
-                if (_onStageEventHandler == null && _onStageEventCallback != null)
+                if (_onStageEventHandler == null && OnStageSignal().Empty() == false)
                 {
                     this.OnStageSignal().Disconnect(_onStageEventCallback);
                 }
@@ -568,7 +568,7 @@ namespace Tizen.NUI
             {
                 _offStageEventHandler -= value;
 
-                if (_offStageEventHandler == null && _offStageEventCallback != null)
+                if (_offStageEventHandler == null && OffStageSignal().Empty() == false)
                 {
                     this.OffStageSignal().Disconnect(_offStageEventCallback);
                 }
@@ -738,10 +738,10 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Quries whether the view has key input focus.
+        /// Quries whether the view has focus.
         /// </summary>
-        /// <returns>true if this view has keyboard input focus</returns>
-        public bool HasKeyInputFocus()
+        /// <returns>true if this view has focus</returns>
+        public bool HasFocus()
         {
             bool ret = NDalicPINVOKE.View_HasKeyInputFocus(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
index 3b59e02eabe1f4bc389fb453d6e9051deec60938..7d7ad51ca082773b957b3f86fbeb07674d3265de 100755 (executable)
@@ -139,7 +139,7 @@ namespace Tizen.NUI
             {
                 _windowFocusChangedEventHandler -= value;
 
-                if (_windowFocusChangedEventHandler == null && _windowFocusChangedEventCallback != null)
+                if (_windowFocusChangedEventHandler == null && WindowFocusChangedSignal().Empty() == false)
                 {
                     WindowFocusChangedSignal().Disconnect(_windowFocusChangedEventCallback);
                 }