From 35f97e743be3890d89e6ff4b66c850ad0cb79eea Mon Sep 17 00:00:00 2001 From: "xb.teng" Date: Wed, 29 Mar 2017 17:25:54 +0800 Subject: [PATCH] Enable nui register a control with namespace Change-Id: Idc637305143606ef759b5bd89a7e9f4f870b8f49 --- src/Tizen.NUI/src/internal/ViewRegistry.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Tizen.NUI/src/internal/ViewRegistry.cs b/src/Tizen.NUI/src/internal/ViewRegistry.cs index e808f34..bf1cb80 100755 --- a/src/Tizen.NUI/src/internal/ViewRegistry.cs +++ b/src/Tizen.NUI/src/internal/ViewRegistry.cs @@ -330,10 +330,10 @@ namespace Tizen.NUI public void Register(Func createFunction, System.Type viewType) { // add the mapping between the view name and it's create function - _constructorMap.Add(viewType.Name, createFunction); + _constructorMap.Add(viewType.ToString(), createFunction); // Call into DALi C++ to register the control with the type registry - TypeRegistration.RegisterControl(viewType.Name, _createCallback); + TypeRegistration.RegisterControl(viewType.ToString(), _createCallback); // Cycle through each property in the class foreach (System.Reflection.PropertyInfo propertyInfo in viewType.GetProperties()) @@ -361,14 +361,14 @@ namespace Tizen.NUI ScriptableProperty scriptableProp = attr as ScriptableProperty; // we get the start property index, based on the type and it's heirachy, e.g. DateView (70,000)-> Spin (60,000) -> View (50,000) - int propertyIndex = _propertyRangeManager.GetPropertyIndex(viewType.Name, viewType, scriptableProp.type); + int propertyIndex = _propertyRangeManager.GetPropertyIndex(viewType.ToString(), viewType, scriptableProp.type); // get the enum for the property type... E.g. registering a string property returns Tizen.NUI.PropertyType.String Tizen.NUI.PropertyType propertyType = GetDaliPropertyType(propertyInfo.PropertyType.Name); // Example RegisterProperty("spin","maxValue", 50001, FLOAT, set, get ); // Native call to register the property - TypeRegistration.RegisterProperty(viewType.Name, propertyInfo.Name, propertyIndex, propertyType, _setPropertyCallback, _getPropertyCallback); + TypeRegistration.RegisterProperty(viewType.ToString(), propertyInfo.Name, propertyIndex, propertyType, _setPropertyCallback, _getPropertyCallback); } } // Console.WriteLine ("property name = " + propertyInfo.Name); @@ -540,4 +540,4 @@ namespace Tizen.NUI } -} \ No newline at end of file +} -- 2.7.4