Re: dictionaryWithObjectsAndKeys
Re: dictionaryWithObjectsAndKeys
- Subject: Re: dictionaryWithObjectsAndKeys
- From: Quincey Morris <email@hidden>
- Date: Sat, 9 Oct 2010 12:49:00 -0700
On Oct 9, 2010, at 12:30, email@hidden wrote:
> m_textAttributes = [NSDictionary dictionary];
> [m_textAttributes setObject:[NSFont systemFontOfSize:12.0] forKey:NSFontAttributeName];
> NSMutableParagraphStyle *pStyle = [[NSMutableParagraphStyle new] autorelease];
> [pStyle setAlignment:NSRightTextAlignment];
> [m_textAttributes setObject:pStyle forKey:NSParagraphStyleAttributeName];
Is that really your code? You're invoking 'setObject:forKey:' on an immutable NSDictionary.
Either you're ignoring a compiler warning, or you have compiler warnings turned off. Neither seems like a very good idea.
_______________________________________________
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