Re: modifying info dictionary
Re: modifying info dictionary
- Subject: Re: modifying info dictionary
- From: Douglas Davidson <email@hidden>
- Date: Fri, 17 Aug 2007 09:52:46 -0700
On Aug 17, 2007, at 8:51 AM, Oscar Bascara wrote:
I'd like to modify the info dictionary so that the About dialog will
indicate the number of days remaining in a trial version.
Specifically, I'd like to tack on that extra information at the end of
NSHumanReadableCopyright:
NSDictionary *dict = [[NSBundle mainBundle] infoDictionary];
NSString *hrc = [dict objectForKey:@"NSHumanReadableCopyright"];
hrc = [NSString stringWithFormat:@"%@ (extra information here)",
hrc];
[dict setValue:hrc forKey:@"NSHumanReadableCopyright"];
Is this an acceptable modification? Are there any side effects that I
should know about?
No, this is not acceptable. As you see, -infoDictionary returns an
NSDictionary, not an NSMutableDictionary. You do not get to modify it.
Douglas Davidson
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden