View Single Post
  (#3 (permalink)) Old
eradis Offline
Talking BlackBerry Encyclopedia
 
Posts: 221
Join Date: Sep 2004
Model: 8700r
Carrier: Rogers
Default 11-03-2005, 04:19 PM

A couple of ways to do this:

1. Use a Hashtable with key as the static int Color map and the value as the String representation of that colour.

2. Use 2 arrays; a 'int' array as the Color values and a 'String' array as the string description. The int and String arrays are mapped directly (i.e. 1 to 1).

ASIDE: Interesting that RIM being a canadian company decided to call the class Color rather than Colour (Canadian Spelling).