X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fbuilder%2Fbuilder-impl.cpp;h=a7fabdfc20d74e870b2d563871fae380c8b14ae5;hb=d748f6c99a59e045b8a8d267012372f996cbc3fd;hp=d9672bbdb53c6748efbff948b48a7dbe707d98ef;hpb=6878c1aacf2964fcfd45548f53dfcca09e2fd831;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/builder/builder-impl.cpp b/dali-toolkit/internal/builder/builder-impl.cpp index d9672bb..a7fabdf 100644 --- a/dali-toolkit/internal/builder/builder-impl.cpp +++ b/dali-toolkit/internal/builder/builder-impl.cpp @@ -102,7 +102,7 @@ bool GetMappingKey( const std::string& str, std::string& key ) } /* - * 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 @@ -117,7 +117,7 @@ void CollectAllStyles( const TreeNode& stylesCollection, const TreeNode& style, { if( OptionalString styleName = IsString( (*iter).second ) ) { - if( OptionalChild node = IsChild( stylesCollection, *styleName) ) + if( OptionalChild node = IsChildIgnoreCase( stylesCollection, *styleName) ) { styleList.push_back( &(*node) ); @@ -193,7 +193,7 @@ void Builder::SetProperties( const TreeNode& node, Handle& handle, const Replace } 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 @@ -1014,10 +1014,13 @@ bool Builder::ConvertChildValue( const TreeNode& mappingRoot, KeyStack& keyStack 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; } @@ -1025,10 +1028,13 @@ bool Builder::ConvertChildValue( const TreeNode& mappingRoot, KeyStack& keyStack 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; } @@ -1225,7 +1231,9 @@ bool Builder::ApplyStyle( const std::string& styleName, Handle& handle, const Re 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 ) {