bool AccessibilityManager::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
{
- Dali::BaseHandle handle( object );
-
bool connected( true );
AccessibilityManager* manager = dynamic_cast<AccessibilityManager*>( object );
- if( 0 == strcmp( signalName.c_str(), SIGNAL_FOCUS_CHANGED ) )
- {
- manager->FocusChangedSignal().Connect( tracker, functor );
- }
- else if( 0 == strcmp( signalName.c_str(), SIGNAL_FOCUS_OVERSHOT ) )
- {
- manager->FocusOvershotSignal().Connect( tracker, functor );
- }
- else if( 0 == strcmp( signalName.c_str(), SIGNAL_FOCUSED_ACTOR_ACTIVATED ) )
+ if( manager )
{
- manager->FocusedActorActivatedSignal().Connect( tracker, functor );
- }
- else
- {
- // signalName does not match any signal
- connected = false;
+ if( 0 == strcmp( signalName.c_str(), SIGNAL_FOCUS_CHANGED ) )
+ {
+ manager->FocusChangedSignal().Connect( tracker, functor );
+ }
+ else if( 0 == strcmp( signalName.c_str(), SIGNAL_FOCUS_OVERSHOT ) )
+ {
+ manager->FocusOvershotSignal().Connect( tracker, functor );
+ }
+ else if( 0 == strcmp( signalName.c_str(), SIGNAL_FOCUSED_ACTOR_ACTIVATED ) )
+ {
+ manager->FocusedActorActivatedSignal().Connect( tracker, functor );
+ }
+ else
+ {
+ // signalName does not match any signal
+ connected = false;
+ }
}
return connected;
bool KeyInputFocusManager::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
{
- Dali::BaseHandle handle( object );
-
bool connected( true );
KeyInputFocusManager* manager = dynamic_cast<KeyInputFocusManager*>( object );
- if( 0 == strcmp( signalName.c_str(), SIGNAL_KEY_INPUT_FOCUS_CHANGED ) )
- {
- manager->KeyInputFocusChangedSignal().Connect( tracker, functor );
- }
- else if( 0 == strcmp( signalName.c_str(), SIGNAL_UNHANDLED_KEY_EVENT ) )
- {
- manager->UnhandledKeyEventSignal().Connect( tracker, functor );
- }
- else
+ if( manager )
{
- // signalName does not match any signal
- connected = false;
+ if( 0 == strcmp( signalName.c_str(), SIGNAL_KEY_INPUT_FOCUS_CHANGED ) )
+ {
+ manager->KeyInputFocusChangedSignal().Connect( tracker, functor );
+ }
+ else if( 0 == strcmp( signalName.c_str(), SIGNAL_UNHANDLED_KEY_EVENT ) )
+ {
+ manager->UnhandledKeyEventSignal().Connect( tracker, functor );
+ }
+ else
+ {
+ // signalName does not match any signal
+ connected = false;
+ }
}
return connected;