> The Palm OS Companion (Part I and Part II) documents look to be updated
for
 Palm OS 5 in the SDK distributions I've seen.  The date on page 2 of the
 document is May 12, 2002.

 There are plenty of changes too.
OK, perhaps some things are added, but changes are not applied.

Please see the following section of the Palm OS Companion document:
User Interface => Color and Grayscale Support => UI Color List
(page 147)

There is the following paragraph:
<QUOTE>
To obtain the color list, the system first tries to load it from the
synchronized preferences database using the value
sysResIDPrefUIColorTableBase plus the current screen depth. The use of a
preference allows for the possibility that individual users could customize
the look using a third party "personality" or "themes" editor. [...]
</QUOTE>

Unfortunately Palm OS 5 doesn't do it. It simply ignores the
"sysResIDPrefUIColorTableBase plus the current screen depth" resource from
the "synchronized preferences database".

My question is what is the compliant method in Palm OS 5? - how to set up
the user interface color theme for a longer time than just for my
application runtime (which I can still do in OS 5 with the
UIColorSetTableEntry function)?

It works perfectly on previous versions of Palm OS (up to 4.1) but it
doesn't work on Palm OS 5!
I believe the documentation is correct, but there's a bug (or limitation, you make the call :)) in the UI initialization code. It assumes that the color table found in the prefs is the ARM version, not the 68K version. So it does indeed load the pref data that you've set up, but because that's in big endian, the number of entries doesn't seem correct, and thus it doesn't get used.

I think you'd need to set up a color table that is (a) little endian, and (b) has two bytes of padding between the entry count and the array of RGB values (which will also have to be little endian).

-- Ken
--
Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to