Pretty sure it is just: rb.content["DISTANCE_FORMAT"] = "{0} miles"; //?? does not like {0}
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of securenetfreedom Sent: Friday, December 12, 2008 10:01 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: AS ResourceBundle Keys with Args? Let me clarify. I am trying to use argument placeholders in my ActionScript created Resource Bundle. In a .properties file, you would write: DISTANCE_FORMAT={0} miles So how would you do the same in ActionScript? The compiler does not like the curly braces {}? rb.content["DISTANCE_FORMAT"] = {0} miles; //?? does not like {0} Thanks, Jeff --- In flexcoders@yahoogroups.com, "securenetfreedom" <nv1...@...> wrote: > > I am creating ActionScript ResourceBundles. > Is possible to create a resource key/value via AS that allows arguments > like: > > rb.content["DISTANCE_FORMAT"] = {0} miles; > > I am getting key/value pairs from a database so I will be creating the > RBs at runtime. So will be looping thru the r! esult set with something > like: > > rb.content[record[i].key] = {0} record[i].value; > > Thanks, > > Jeff >