Change-Id: Ib0fdcdf42d43f98e95d544fc27693b94282afb41
std::string Button::AccessibleImpl::GetNameRaw()
{
+ std::string labelText;
auto slf = Toolkit::Button::DownCast( self );
+ Property::Map labelMap = slf.GetProperty<Property::Map>( Toolkit::Button::Property::LABEL );
- Property::Map label = slf.GetProperty<Property::Map>( Toolkit::Button::Property::LABEL );
-
- std::string labelText;
- label.Find( Toolkit::TextVisual::Property::TEXT )->Get( labelText );
+ Property::Value* textPropertyPtr = labelMap.Find( Toolkit::TextVisual::Property::TEXT );
+ if ( textPropertyPtr )
+ {
+ textPropertyPtr->Get( labelText );
+ }
return labelText;
}
+
Property::Index Button::AccessibleImpl::GetNamePropertyIndex()
{
Property::Index label = Toolkit::Button::Property::LABEL;