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

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