Re: [Newbie] read version number from installed package
Re: [Newbie] read version number from installed package
- Subject: Re: [Newbie] read version number from installed package
- From: Alex Rice <email@hidden>
- Date: Tue, 3 Jun 2003 09:55:21 -0600
On Tuesday, June 3, 2003, at 08:49 AM, Jens Frederich wrote:
Hi,
I've follow problem.
With this message I readout the version number from my current
application.
[ gVersion setStringValue: [ NSString stringWithFormat: [ gVersion
stringValue ],
[[ self bundle ] objectForInfoDictionaryKey:
@"CFBundleShortVersionString" ],
[[[ self bundle ] objectForInfoDictionaryKey:
@"CFBundleVersion" ] intValue ]]];
Not really relating to your question: but isn't the first parameter to
stringWithFormat: a format string. The above would work if gVersion
already has a format string in it, but subsequent calls would fail
because gVersion would no longer have a valid format string in it. Just
confirming you aren't calling that code more than once.
How can I determine / read the version number from an installed
package? For example, a package located at
/Library/Receipts/Sample.pkg/Contents... . Thank you!
Maybe replace [self bundle] with [NSBundle bundleWithPath:
@"/Library/Receipts/Sample.pkg"]?
Alex Rice <email@hidden> | Mindlube Software |
http://mindlube.com
what a waste of thumbs that are opposable
to make machines that are disposable -Ani DiFranco
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.