• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: dictionaryWithObjectsAndKeys
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: dictionaryWithObjectsAndKeys
      • From: email@hidden
References: 
 >dictionaryWithObjectsAndKeys (From: email@hidden)
 >Re: dictionaryWithObjectsAndKeys (From: Ken Thomases <email@hidden>)
 >Re: dictionaryWithObjectsAndKeys (From: email@hidden)

  • Prev by Date: Re: dictionaryWithObjectsAndKeys
  • Next by Date: Re: dictionaryWithObjectsAndKeys
  • Previous by thread: Re: dictionaryWithObjectsAndKeys
  • Next by thread: Re: dictionaryWithObjectsAndKeys
  • Index(es):
    • Date
    • Thread