multiple files in PilRC
I'm using CW 9.0 and am running into a problem with my resource files. I'd like to have a separate resource file for all my strings. There are two reasons for this: (1) It makes it easy to quickly create foreign languages of the app, and (b) I can hand the file to a doc writer so that s/he can edit the strings without being overwhelmed by all the rest of the stuff in the .rcp file. Anyhow, I'd like to slightly change the standard resource file structure so that I have three files that look something like this: MyAppRsc.h -- #define DoSomethingAlert 1001 #define DoSomethingHelpString 1002 Strings.h - STRING ID DoSomethingHelpString "This is my help string." MyApp.rcp - #include "MyAppRsc.h" #include "Strings.h" ALERT ID DoSomethingAlert CONFIRMATION HELPID DoSomethingHelpString BEGIN TITLE "Do something" MESSAGE "Are you sure?" BUTTONS "OK" "Cancel" END Unfortunately, this code generates all sorts of PilRC compiler errors. Has anyone come up with a way of doing something like I'm proposing? Moreover, is there a way of putting the text for the TITLE, MESSAGE, and BUTTONS into the separate string file? If anyone has any suggestions or answers, I'd be most grateful. Thanks, Jay [EMAIL PROTECTED] -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: multiple files in PilRC
I do this all the time. In fact, I have each form defined in it's own file. Perhaps PilRC is being confused because you have named the file containing your string as a .h. Try naming it Strings.rcp and change the include to this name. Bob At 05:22 PM 7/10/2003 -0400, you wrote: I'm using CW 9.0 and am running into a problem with my resource files. I'd like to have a separate resource file for all my strings. There are two reasons for this: (1) It makes it easy to quickly create foreign languages of the app, and (b) I can hand the file to a doc writer so that s/he can edit the strings without being overwhelmed by all the rest of the stuff in the .rcp file. Anyhow, I'd like to slightly change the standard resource file structure so that I have three files that look something like this: MyAppRsc.h -- #define DoSomethingAlert 1001 #define DoSomethingHelpString 1002 Strings.h - STRING ID DoSomethingHelpString "This is my help string." MyApp.rcp - #include "MyAppRsc.h" #include "Strings.h" ALERT ID DoSomethingAlert CONFIRMATION HELPID DoSomethingHelpString BEGIN TITLE "Do something" MESSAGE "Are you sure?" BUTTONS "OK" "Cancel" END Unfortunately, this code generates all sorts of PilRC compiler errors. Has anyone come up with a way of doing something like I'm proposing? Moreover, is there a way of putting the text for the TITLE, MESSAGE, and BUTTONS into the separate string file? If anyone has any suggestions or answers, I'd be most grateful. Thanks, Jay [EMAIL PROTECTED] -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: multiple files in PilRC
At 05:22 PM 7/10/2003, Tucker, Jay wrote: I'm using CW 9.0 and am running into a problem with my resource files. I'd like to have a separate resource file for all my strings. There are two reasons for this: (1) It makes it easy to quickly create foreign languages of the app, and (b) I can hand the file to a doc writer so that s/he can edit the strings without being overwhelmed by all the rest of the stuff in the .rcp file. Anyhow, I'd like to slightly change the standard resource file structure so that I have three files that look something like this: MyAppRsc.h -- #define DoSomethingAlert 1001 #define DoSomethingHelpString 1002 Strings.h - STRING ID DoSomethingHelpString "This is my help string." MyApp.rcp - #include "MyAppRsc.h" #include "Strings.h" ALERT ID DoSomethingAlert CONFIRMATION HELPID DoSomethingHelpString BEGIN TITLE "Do something" MESSAGE "Are you sure?" BUTTONS "OK" "Cancel" END Unfortunately, this code generates all sorts of PilRC compiler errors. Has anyone come up with a way of doing something like I'm proposing? Moreover, is there a way of putting the text for the TITLE, MESSAGE, and BUTTONS into the separate string file? If anyone has any suggestions or answers, I'd be most grateful. PilRC 3.0 supports string-based #defines, so you could write something like res-english.rcp: #define HELLO "Hello" #include "res.rcp" res-french.rcp: #define HELLO "Bonjour" #include "res.cpp" res.rcp: GENERATEHEADER "res.h" RESETAUTOID 1000 STRING ID HelloString HELLO A beta version of PilRC 3.0 will be part of the CW 9.2 preview drop to be posted soon. You can build it right now using the files in CVS at the PilRC project page on sourceforge.net. -- Ben Combee <[EMAIL PROTECTED]> CodeWarrior for Palm OS technical lead Palm OS programming help @ www.palmoswerks.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/