Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / CodeWarrior / May 2004



Tip: Looking for answers? Try searching our database.

target-dependant defines in a *.r file ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Klaus Kloos - 27 May 2004 09:36 GMT
Hello

I want to use the same "*.r* file defining 'MENU' resources in a Carbon
and in a Classic part of a project.

Only in the classic part the extended-bits are used for modifier-keys.
(Mercutio)

one example:

// this does not work, cause the prefix-file is not parsed for *.r files
#ifdef PP_Target_Carbon
#define menuShift plain
#define menuCondence plain
#else
#define menuShift extend                //64
#define menuCondence condense   //32
#endif

resource 'MENU' (129, "Ablage Menu") {
       129,
       19999,
       0x7FFFB6F7,
       enabled,
       "xxx",
       {       /* array: 16 elements */
               /* [1] */
               "Neu", noIcon, "N", noMark, plain,
               /* [2] */
               "Öffnen", noIcon, "O", noMark, plain,
               /* [3] */
               "hinzu laden...", noIcon, "O", noMark, menuShift,
// menuShift has to be 0 at carbon and 64 at classic
               /* [4] */
....

Ive tried target-dependant define files which are loaded at the start of
the *.r files, but the search-path for files is not target-dependant(?).

Anyone who can give me a hint?

Thanks in advance.

Greetings Klaus
David Phillip Oster - 27 May 2004 16:04 GMT
> Anyone who can give me a hint?

Have you gone into each target's settings' Rez Preferences Panel, and
given each target a distinct Rez prefix file?

If all you care about is Carbon versus Classic, then all your Carbon
targets can assign as their Rez prefix file: IsCarbon.r :

// IsCarbon.r
#define PP_Target_Carbon 1
Klaus Kloos - 27 May 2004 17:43 GMT
> Have you gone into each target's settings' Rez Preferences Panel, and
> given each target a distinct Rez prefix file?

That was it :-)
I didnt know there is a own prefix-file for Rez.

many thanks for this and all your other good explanations in the past.

Greeting Klaus
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.