[comp.sys.mac.programmer] MPW & resources

edwardsc@dcs.glasgow.ac.uk (Chris Edwards) (05/02/91)

With MPW, one normally uses Rez to compile text resources. However, I can't see
how to make it use precompiled resources.

Can anyone help ?

Chris Edwards

ARPA:   edwardsc%uk.ac.glasgow.dcs@nsfnet-relay.ac.uk
USENET: edwardsc@cs.glasgow.uucp

ml27192@uxa.cso.uiuc.edu (Mark Lanett) (05/03/91)

edwardsc@dcs.glasgow.ac.uk (Chris Edwards) writes:
>With MPW, one normally uses Rez to compile text resources. However, I can't see
>how to make it use precompiled resources.

You can always derez binaries into rez files. If you want to link with them
rather than derez them (more likely), just put a
include "<your_filename>.rsrc"
into the rez file.
--
//-----------------------------------------------------------------------------
Mark Lanett						ml27192@uxa.cs.uiuc.edu
Software Tools Group, NCSA				mlanett@ncsa.uiuc.edu

peirce@outpost.UUCP (Michael Peirce) (05/03/91)

In article <1991May2.093409.26742@dcs.glasgow.ac.uk>, edwardsc@dcs.glasgow.ac.uk (Chris Edwards) writes:
> 
> With MPW, one normally uses Rez to compile text resources. However, I can't see
> how to make it use precompiled resources.
> 
> Can anyone help ?

There are two types of include directives in Rez: include and #include.

The #include is used to include other .r files, i.e. text.

The include is used to include resources.  For example:

include "INIT File" 'INIT' (0);

Will grab the INIT resource with ID = 0 from the "INIT File" file.

include "INIT File" 'INIT';

Will grab *all* the INIT reosurces from the file.

include "INIT File";

Will grab *all* the resource from the file.


--  Michael Peirce         --   outpost!peirce@claris.com
--  Peirce Software        --   Suite 301, 719 Hibiscus Place
--  Macintosh Programming  --   San Jose, California 95117
--           & Consulting  --   (408) 244-6554, AppleLink: PEIRCE