At 12:00am -0700 00-10-27, Palm Developer Forum digest wrote:
>Subject: Continued: Resource ID numbers
>From: "Jaco Vis" <[EMAIL PROTECTED]>
>Date: Thu, 26 Oct 2000 09:45:44 +0100
>X-Message-Number: 4
>
>Thanks to all that responded to my original question regarding ID numbers. =
>After I've changed my formID to be between 1.000 en 10.000 all is working w=
>ell.=20
>But, since one answer almost always leads to another question, here's somet=
>hing I'm worried about. I now have a project with 34 forms. The application=
>  must be able to switch at runtime from the base language to one other lang=
>uage. I have implemented this by adding an extra resource file to my projec=
>t and translating all forms (and other language dependent resources, such a=
>s strings, stringlist, alerts) to the secondary language. I've renumbered a=
>ll ID's in this second resource so they don't clash with original ID's. Thi=
>s is where my original problem occured: I had renumber them by adding 10.00=
>0 to the original resource number. The original problem was solved by not a=
>dding 10.000, but 5.000 to the original ID. But this leads to the fact that=
>  the maximum number of forms for the project is limited to 40. The construc=
>tor starts numbering at 1000, incrementing the ID for any new form with 100=
>. In my solution I can go up to form ID 4900, which leads to the fact that =
>now I am only able to add 6 more forms before running out of form ID's. Thi=
>s will lead to a problem in the nearby future. If anyone has a solution for=
>  my problem, please let me know!

Overlays are one way of segmenting your localizable data into 
locale-specific PRCs. Currently, however, the system will only 
auto-open the overlay that matches the device's current locale. Being 
able to switch languages (locales) at run-time requires some extra 
work on the part of the application.

One technique would be to still use overlays, but add some code to 
your app that explicitly opens the correct overlay if the user's 
requested UI locale != current locale. Each overlay contains the same 
set of resources (with identical IDs), localized for the 
corresponding locale. Once a resource DB (such as an overlay PRC) has 
been opened by your app "above" the current app's DB, requests for a 
given resource (e.g. tFRM=1000) will get the resource from the 

overlay, not your base application.

Hmm, this topic has come up before. Maybe I should write some sample code...

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