Remove unused FindActorByAlias 14/36614/2
authorKimmo Hoikka <kimmo.hoikka@samsung.com>
Tue, 10 Mar 2015 17:33:43 +0000 (17:33 +0000)
committerKimmo Hoikka <kimmo.hoikka@samsung.com>
Wed, 11 Mar 2015 10:50:18 +0000 (10:50 +0000)
Change-Id: I6838d61433ebcf1c84d4d42846ca7abf7a8d5d1c

dali-toolkit/internal/builder/builder-signals.cpp
dali-toolkit/public-api/controls/control-impl.cpp
dali-toolkit/public-api/controls/control-impl.h
plugins/dali-script-v8/src/actors/actor-api.cpp
plugins/dali-script-v8/src/actors/actor-api.h
plugins/dali-script-v8/src/actors/actor-wrapper.cpp

index 40428e3..0efd85b 100644 (file)
@@ -43,12 +43,12 @@ using namespace Dali;
 // Signal Actions
 //
 
-// Action on child actor. The child is found by alias so can be 'previous' etc.
+// Action on child actor. The child is found by name
 struct ChildActorAction
 {
   std::string actorName;
   std::string actionName;
-  std::string childAlias;
+  std::string childName;
   PropertyValueContainer parameters;
 
   void operator()(void)
@@ -57,7 +57,7 @@ struct ChildActorAction
 
     if(actor)
     {
-      Actor child_actor = actor.FindChildByAlias(childAlias);
+      Actor child_actor = actor.FindChildByName(childName);
 
       if(child_actor)
       {
@@ -65,7 +65,7 @@ struct ChildActorAction
       }
       else
       {
-        DALI_SCRIPT_WARNING("Could not find child by alias '%s'\n", childAlias.c_str());
+        DALI_SCRIPT_WARNING("Could not find child by name '%s'\n", childName.c_str());
       }
     }
   };
@@ -239,7 +239,7 @@ boost::function<void (void)> GetAction(const TreeNode &root, const TreeNode &chi
   {
     ChildActorAction action;
     action.actorName       = *actorName;
-    action.childAlias      = *childActorName;
+    action.childName       = *childActorName;
     action.actionName      = *actionName;
     GetParameters(child, action.parameters);
     callback = action;
index 16a009b..b79badd 100644 (file)
@@ -1308,11 +1308,6 @@ bool Control::OnMouseWheelEvent(const MouseWheelEvent& event)
   return false; // Do not consume
 }
 
-Actor Control::GetChildByAlias(const std::string& actorAlias)
-{
-  return Actor();
-}
-
 void Control::OnStageConnection()
 {
   RelayoutRequest();
index 72c0535..a441b07 100644 (file)
@@ -646,11 +646,6 @@ private:
    */
   virtual bool OnMouseWheelEvent(const MouseWheelEvent& event);
 
-  /**
-   * @copydoc Dali::CustomActorImpl::GetChildByAlias(const std::string& actorAlias)
-   */
-  virtual Actor GetChildByAlias(const std::string& actorAlias);
-
   // From CustomActorImpl, derived classes should NOT override these.
 
   /**
index ebc1fa7..89a3a67 100644 (file)
@@ -335,39 +335,6 @@ void ActorApi::FindChildByName( const v8::FunctionCallbackInfo<v8::Value>& args
 }
 
 /**
- * Search through this actor's hierarchy for an actor with the given name or alias.
- *
- * Actors can customize this function to provide actors with preferred alias'
- * For example 'previous' could return the last selected child.
- * If no aliased actor is found then FindChildByName() is called.
- *
- * @for Actor
- * @method findChildByAlias
- * @param {String} actor alias
- * @return {Object} actor on success, empty actor handle if not found
- */
-void ActorApi::FindChildByAlias( const v8::FunctionCallbackInfo<v8::Value>& args )
-{
-  v8::Isolate* isolate = args.GetIsolate();
-  v8::HandleScope handleScope( isolate );
-  Actor parent = GetActor( isolate, args );
-  bool found( false );
-  std::string name = V8Utils::GetStringParameter( PARAMETER_0, found, isolate, args );
-  if( !found )
-  {
-    DALI_SCRIPT_EXCEPTION( isolate, "String parameter not found" );
-    return;
-  }
-  Actor childActor = parent.FindChildByAlias( name );
-  if( childActor )
-  {
-    // wrap the child
-    v8::Local < v8::Object > wrappedLayer = ActorWrapper::WrapActor( isolate, childActor );
-    args.GetReturnValue().Set( wrappedLayer );
-  }
-}
-
-/**
  * Search through this actor's hierarchy for an actor with the given unique ID.
  * The actor itself is also considered in the search
  *
index 38bc95a..8b27961 100644 (file)
@@ -58,7 +58,6 @@ namespace ActorApi
   void Unparent( const v8::FunctionCallbackInfo< v8::Value >& args);
   void GetChildAt( const v8::FunctionCallbackInfo< v8::Value >& args);
   void FindChildByName( const v8::FunctionCallbackInfo< v8::Value >& args);
-  void FindChildByAlias( const v8::FunctionCallbackInfo< v8::Value >& args);
   void FindChildById( const v8::FunctionCallbackInfo< v8::Value >& args);
   void GetParent( const v8::FunctionCallbackInfo< v8::Value >& args );
   void GetChildCount( const v8::FunctionCallbackInfo< v8::Value >& args );
index 7d10f3a..dded413 100644 (file)
@@ -199,7 +199,6 @@ const ActorFunctions ActorFunctionTable[]=
     { "GetChildCount",     ActorApi::GetChildCount,    ACTOR_API },
     { "GetChildAt"   ,     ActorApi::GetChildAt,       ACTOR_API },
     { "FindChildByName",   ActorApi::FindChildByName,  ACTOR_API },
-    { "FindChildByAlias",  ActorApi::FindChildByAlias, ACTOR_API },
     { "FindChildById",     ActorApi::FindChildById,    ACTOR_API },
     { "GetParent" ,        ActorApi::GetParent,        ACTOR_API },
     { "GetActorType" ,     ActorApi::GetActorType,     ACTOR_API }, // custom for javascript