- // If so, downcast the handle of singleton to focus factory
- factory = LocalizedControlFactory(dynamic_cast<Internal::LocalizedControlFactory*>(handle.GetObjectPtr()));
- }
-
- if(!factory)
- {
- // If not, create the focus factory and register it as a singleton
- factory = LocalizedControlFactory(new Internal::LocalizedControlFactory());
- adaptor.RegisterSingleton(typeid(factory), factory);
+ Dali::BaseHandle handle = singletonService.GetSingleton(typeid(LocalizedControlFactory));
+ if(handle)
+ {
+ // If so, downcast the handle of singleton to focus factory
+ factory = LocalizedControlFactory(dynamic_cast<Internal::LocalizedControlFactory*>(handle.GetObjectPtr()));
+ }
+
+ if(!factory)
+ {
+ // If not, create the focus factory and register it as a singleton
+ factory = LocalizedControlFactory(new Internal::LocalizedControlFactory());
+ singletonService.Register(typeid(factory), factory);
+ }