1) Create your ResourceBundle for that properties file containing all your measurement information, then from that get the enumeration from "getKeys" then cycle over the keys getting the values, doing your logic on each value (if contains DISTANCE then blah).
2) You can call get normally here but when you get back your result, call a string.split(",") on it to get back a 2-element array, one with "en_US" in it and the other with "USA" in it, then you do your logic to make one the display variable and one the logical variable in the system. NOTE: String.split is insanely fast, actually all of the regexp package is insanely fast, I tried benchmarking it once to see if I should implement a much simplier routine for my parser, and the regexp package blew me away, it was almost rediculous how fast it was.
Johan Wasserman - BCX - Infrastructure Services wrote:
As a RAW newbie: How do I buid an ArayList of properties for a menu? for example; I have a resource file containing: DISTANCE_MILE=Mile DISTANCE_KILO=Kilometre DISTANCE_FEET=Feet DISTANCE_METRE=Metre AREA_SQ_FOOT=Sqare Foot AREA_SQ_METRE=Square Metre VOLUME_QUBIC_INCH=q' VOLUME_QUBIC_METRE=m2
now, I need to (from a class), get the resource bundle and build an araylist of (key, value) for DISTANCE* so that only the distance parameters show up in my list.
To do this even more trickier.... if I have something like: LANG_EN_US=en_US, USA LANG_EN_UK=en_UK, England ...etc
how do I have the en_US (constant) as the value and USA (variable, depending on language) as the display?
get my drift?
Thank you for a wonderrful forum (MSDN, go suck eggs!)
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]