}
/*
- * Recursively collects all stylesin a node (An array of style names).
+ * Recursively collects all styles in a node (An array of style names).
*
* stylesCollection The set of styles from the json file (a json object of named styles)
* style The style array to begin the collection from
{
if( OptionalString styleName = IsString( (*iter).second ) )
{
- if( OptionalChild node = IsChild( stylesCollection, *styleName) )
+ if( OptionalChild node = IsChildIgnoreCase( stylesCollection, *styleName) )
{
styleList.push_back( &(*node) );
}
else
{
- DALI_SCRIPT_VERBOSE("SetProperty INVALID '%s' Index=:%d\n", key.c_str(), index);
+ DALI_LOG_ERROR("Key '%s' not found.\n", key.c_str());
}
// Add custom properties
case Property::MAP:
{
Property::Map* map = child.GetMap();
- for( Property::Map::SizeType i=0; i < map->Count(); ++i )
+ if( map )
{
- Property::Value& child = map->GetValue(i);
- ConvertChildValue(mappingRoot, keyStack, child);
+ for( Property::Map::SizeType i=0; i < map->Count(); ++i )
+ {
+ Property::Value& child = map->GetValue(i);
+ ConvertChildValue(mappingRoot, keyStack, child);
+ }
}
break;
}
case Property::ARRAY:
{
Property::Array* array = child.GetArray();
- for( Property::Array::SizeType i=0; i < array->Count(); ++i )
+ if( array )
{
- Property::Value& child = array->GetElementAt(i);
- ConvertChildValue(mappingRoot, keyStack, child);
+ for( Property::Array::SizeType i=0; i < array->Count(); ++i )
+ {
+ Property::Value& child = array->GetElementAt(i);
+ ConvertChildValue(mappingRoot, keyStack, child);
+ }
}
break;
}
DALI_ASSERT_ALWAYS(mParser.GetRoot() && "Builder script not loaded");
OptionalChild styles = IsChild( *mParser.GetRoot(), KEYNAME_STYLES );
- OptionalChild style = IsChild( *styles, styleName );
+
+ std::string styleNameLower(styleName);
+ OptionalChild style = IsChildIgnoreCase( *styles, styleNameLower );
if( styles && style )
{