> I'm in the process of moving my apps from gcc to CW (due mainly to the
> poor multi-segment support in gcc). However, in one app I have a few data
> resources that I created via a perl script. In prc-tools, all I had to do
> was take these files, name them appropriately and add them to build-prc to
> have them appear in the app.
>
> Is there a way to do something similar in CW?

In the same way you can add .prc files as resources to your app, you can add
the contents of any file as a resource using the Rez compiler.

Let's say you've got a binary file (foo.bin) you'd like to have included as
a
resource in your application.

Create a .r file with the following line in it:
read 'XXXX' (2000) "foo.bin" ;

That'll read "foo.bin" and create a resource (of type 'XXXX' with ID 2000)
with its contents.

This assumes you've already set up the file mappings so that .r files are
compiled by Rez.

Make sure that "foo.bin" is not longer than 63.5K or you'll end up with an
invalid database (since you'll have a record that's longer than the maximum
allowed).

Neil

--
Neil Rhodes
Calliope Enterprises, Inc.
1328 Clock Avenue
Redlands, CA  92374
(909) 793-5995     [EMAIL PROTECTED]      fax: (909) 793-2545

----------
>From: Chris DiPierro <[EMAIL PROTECTED]>
>To: "Palm Developer Forum" <[EMAIL PROTECTED]>
>Subject: Arbitrary data resources in CW?
>Date: Wed, Jun 14, 2000, 11:17 AM
>

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

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