I'm not sure if I would call it the "prefered way" but it is "a way".
Constructor is an older application and it's use is becoming deprecated.
This definitely falls into the category of "workaround" but it's doable.
I use this on one of my personal projects that I haven't converted to
PODS yet.

You need to be using CW 9.x (preferably 9.3) and the Palm OS 68K Linker
(not the Mac OS Linker + PalmRez).  The PalmOS linker in 9.x knows about
some of the file types used in this workaround.  The Mac OS linker does
not.

Download and install PODS 1.1 from the PalmSource site.  In the PODS
installation directory, you will need the executable PalmRC.exe.  It's
OK to leave it where it is, just so long as you make note of it's
location (probably "C:\Program Files\PalmSource\Palm OS Developer
Suite\PalmOSTools\PalmRC.exe").

Convert the existing resource file into an XML resource file with a .XRD
extension using the GenerateXRD tool.  There is a GUI version of the
tool called "GenerateXRD Wizard.exe" in the PODS install directory.  The
output of this tool will be a text XML file that is the equivalent of
the Constructor RSRC file.

Open the new XRD file with the Palm OS Resource Editor or your favorite
text editor.  The resource editor will allow you to do GUI manipulation
on the form but with 99+ objects, it might not let you do what you want
to do.  The XRD format is very straightforward and you can add new form
objects easily using a text editor.  Just follow the syntax used in the
rest of the resources.

Open a command window and CD to your project directory (lets say
C:\MyProj for this example).  Create a batch file in that directory with
the following contents

REM BUILD XRD RESOURCES FOR CODEWARRIOR
CD C:\MyPROJ
"C:\Program Files\PalmSource\Palm OS Developer
Suite\PalmOSTools\PalmRC.exe" MyResources.XRD -o MyResources.TRC

Execute that batch file once time.  There should now be a file with a
.TRC extension in the folder.  Add that file to your CodeWarrior
project.  Remove the Constructor resource file from your CodeWarrior
project that you converted to XRD.

Build your project and make sure that this worked.

>From now on, you will use the Palm OS Resource Editor for that one file.
Or a text editor.  Every time you change the XRD file using the resource
editor, you will need to launch that batch file to update the TRC file.
If you build your project and find that your new resources aren't in the
built app, you've probably forgotten to run the batch file.

If you want to convert only the one resource and continue to use
Constructor for everything else, you can do so with a little
constructive cutting and pasting.  Constructor resources and XRD
resources will cooperate in the same project so long as there aren't any
duplicates.

-E

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Richard Coutts
> Sent: Friday, January 14, 2005 10:50 AM
> To: Palm Developer Forum
> Subject: Constructor's 99 resource limit
> 
> 
> I just went to add a couple objects to my main form and ran 
> into the 99 limit.  From the docs:
> 
>     "To keep resource ID numbers of interface items in a form
>      from conflicting with the ID numbers of items in other forms,
>      Constructor imposes a limit of 99 user interface items in a form"
> 
> I really need all of the objects in the form, though not all 
> visible at the same time.  At the moment, I put them all 
> there and then show and hide them as needed.
> 
> What's the preferred way work working around this limit?  Can 
> I create the object and just add it or remove it at runtime?
> 
> Thanks,
> Rich 
> 
> 
> --
> 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/

Reply via email to