On Wed, 7 Feb 2001 16:19:49 -0800 John Marshall wrote:

>Ken Krugler <[EMAIL PROTECTED]> wrote:
>  > 3. The 4.0 SDK has LmGlueXXX routines in PalmOSGlue.lib that do the
>  > right thing on all versions of the OS (hmmm, not sure about 1.0).
>
>Gee, Ken, haven't you read the documentation?

You can't trust everything you read.

>From the Palm OS Reference:
>
>       Use PalmOSGlue only on versions 2.0 and later of Palm OS®.

Yes, that's the original warning that I gave to the tech writer, 
because the first release of PalmOSGlue.lib only contained Text Mgr 
glue calls. These relied on the presence of the IntlDispatch trap to 
determine whether it was safe to call the real Text Mgr routines. 
Unfortunately in Palm OS 1.0 the IntlDispatch trap was actually the 
PsrInit() trap, thus this check returns a false positive result, and 
you'll crash & burn.

The LmGlueXXX routines are different, in that they don't test for 
IntlDispatch. The specific issue is whether the 'cnty' resource 
existed in 1.0. To check that, I needed to fire up a 1.0 ROM image, 
which I didn't have at the time I wrote the response.


As it turns out, the 'cnty' resource was added in 2.0, so the current 
documentation warning is still valid. If you call the LmGlueXXX 
routines on a 1.0 ROM, you won't die, but you'll always get an 
"invalid locale index" result when trying to find the index for any 
locale.

-- 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/tech/support/forums/

Reply via email to