View Single Post
Old 11-03-2005, 03:19 PM   #3 (permalink)
Talking BlackBerry Encyclopedia
Join Date: Sep 2004
Model: 8700r
Carrier: Rogers
Posts: 221
Post Thanks: 0
Thanked 0 Times in 0 Posts

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).