1 Reply Latest reply on Jan 31, 2011 3:24 AM by gayathri_

    Resource Bundle


      I have key value pairs in my resources.properties file.

      I need to access the key given a particular value.How do i do that?

        • 1. Re: Resource Bundle
          gayathri_ Level 1

          I have an array of child objects and i need to change their labels based on user input and update the resource bundle too.



          what does this staement return? ResourceManager.getInstance().getString( bundleName, child.id );


          The code is as below...  There is something wrong in newRB.content[resourceManager.getString('resources',childObject.id)]


          Kindly help


              public function setDetails(containerArray:Array,replaced:ArrayCollection):void
                          var newRB:ResourceBundle = new ResourceBundle("en_US", "resources");
                          var i:int=0;
                          for each (var childObject:Object in containerArray)
                          {    if(i>=replaced.length) break;
                                  newRB.content[ResourceManager.getInstance().getString('resources',childObject.id)]=replac ed.getItemAt(i).data;}
                              else if (childObject.hasOwnProperty("label"))
                                  trace(ResourceManager.getInstance().getString( 'resources', childObject.id));   //returns null
                                  newRB.content[resourceManager.getString('resources',childObject.id)]=replaced.getItemAt(i ).data;}
                          resourceManager.localeChain = [ "en_US" ];
                          trace("new resource bundle!");
                          trace(resourceManager.getString("newRB", "OPEN"));