> ---I wrote:
> > In the Mac world, a "file" can have a data fork and a 
> > resource fork.  The .rsrc files created by Constructor 
> > have no data, but they do contain resources.  That's 
> > why you see two files and one has 0 bytes.
> > You need to copy both files and the folder to copy a 
> > .rsrc file.

--- Jason Freund <[EMAIL PROTECTED]> wrote:
> I still don't understand why there needs to be a file with 
> 0 bytes. 

The 0 byte file is the "data fork".  The reason for the bizarre breakup
of the file into separate files is because the CW for Palm compiler
started its life in the Mac world and was ported to Windows.

A sample .rsrc file on Windows looks like this:

Starter.rsrc   -- your 0 byte data fork
Resource.Frk   -- a folder (might be hidden)
Resource.Frk\Starter.rsrc   -- the resource fork

In order to copy the resource file, you need to copy all three.  Plus,
Constructor creates a header file (e.g., StarterRsc.h) which contains
defines for all the resources in your .rsrc file, so you might as well
copy that, too.

When you open a resource file in CodeWarrior, what you open (e.g.
double click in Windows Explorer, or Project | Add Files... in
CodeWarrior) is the 0 byte resource file.  CodeWarrior assembles all of
the pieces it needs from the files and directory I described above.

> Do you mean that I should create a new directory for my new 
> rsrc file (like Project/RESOURCE_NEWTARGET.FRK/myrsrc_newtarget.rsrc)

> or just create a copy in the same directory (like 
> Project/RESOURCE.FRK/myrsrc_newtarget.rsrc)
> Also, which of the two rsrc files does CW expect me to add 
> to the project-- the 0 byte or non-zero byte version?

They can both be in the same directory.  In the default setup,
CodeWarrior creates an Rsc folder and puts the .rsrc and .h files and
the resource fork folder with its .rsrc file in there.  You can have
more than one resource set in those same folders.  (However, I think
there are potential problems with CodeWarrior if you add 2 different
.rsrc files to a single target.)

>  BTW, What does fork mean in this context? :)

Its meaning is the same as in "Stick a fork in it; I think it's done."
Or, maybe its meaning is closer to "He speaks with forked tongue." :)


__________________________________________________
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/

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

Reply via email to