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 / February 2005



Tip: Looking for answers? Try searching our database.

Using numbers in a .plc file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
madesmet - 26 Feb 2005 18:51 GMT
Hi,

I would like to create a Info.plist that contains the current version of
the application in the CFBundleGetInfoString key.

The current build number is present in an external header file
Versions.h:

#define APPLICATION_VERSION 5

I can include Versions.h in my .plc file, but how can I use the value
APPLICATION_VERSION in the string CFBundleGetInfoString ? This key expects
a string and not a number.

Is there a way to convert the number 5 into a string that can be used
with

key "CFBundleGetInfoString" value string APPLICATION_VERSION

I have tried the usual precompiler way with # but that does not work.

A macro like APPLICATION_VERSION_STRING would solve my problem, but I have
the problem that I can not change Versions.h.

#define APPLICATION_VERSION_STRING "5"

I am using CodeWarrior 8.3.

Thanks,

Marc De Smet
James W. Walker - 26 Feb 2005 23:13 GMT
In article
<d3366a25580e36b3b0b3034aedc174ec@localhost.talkaboutmac.com>, madesmet

> Is there a way to convert the number 5 into a string that can be used
> with
>
> key "CFBundleGetInfoString" value string APPLICATION_VERSION

From the release notes for the property list compiler:

"Added new __STRING__() pseudo-macro directive to convert non-string
items into strings."
David Phillip Oster - 27 Feb 2005 00:47 GMT
> In article
> <d3366a25580e36b3b0b3034aedc174ec@localhost.talkaboutmac.com>, madesmet
[quoted text clipped - 8 lines]
> "Added new __STRING__() pseudo-macro directive to convert non-string
> items into strings."

What a shame they didn't just grab the preprocessor from their Rez
compiler, and given us $$format().

Signature

David Phillip Oster

 
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.