Enable nui register a control with namespace 84/121884/1
authorxb.teng <xb.teng@samsung.com>
Wed, 29 Mar 2017 09:25:54 +0000 (17:25 +0800)
committerxb.teng <xb.teng@samsung.com>
Wed, 29 Mar 2017 09:25:54 +0000 (17:25 +0800)
Change-Id: Idc637305143606ef759b5bd89a7e9f4f870b8f49

Tizen.NUI/src/internal/ViewRegistry.cs

index e808f34..bf1cb80 100755 (executable)
@@ -330,10 +330,10 @@ namespace Tizen.NUI
         public void Register(Func<CustomView> 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
+}