• 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: *** -[NSCFDictionary setObject:forKey:]: mutating method sent to immutable object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: *** -[NSCFDictionary setObject:forKey:]: mutating method sent to immutable object


  • Subject: Re: *** -[NSCFDictionary setObject:forKey:]: mutating method sent to immutable object
  • From: "Hamish Allan" <email@hidden>
  • Date: Tue, 19 Feb 2008 19:24:23 +0000

On Feb 19, 2008 6:00 PM, Daniel Child <email@hidden> wrote:

> - (id) init
> {
>         data = [[NSMutableDictionary alloc] init];
>         return self = [super initWithWindowNibName: @"Step1Window"];
> }

Always call [super init...] at the start of your init method.
Otherwise, your superclass could be overwriting the ivar called "data"
with, e.g., an immutable NSDictionary.

Hamish
_______________________________________________

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: *** -[NSCFDictionary setObject:forKey:]: mutating method sent to immutable object
      • From: Bill Bumgarner <email@hidden>
References: 
 >*** -[NSCFDictionary setObject:forKey:]: mutating method sent to immutable object (From: Daniel Child <email@hidden>)

  • Prev by Date: Visual iTunes Plugins Questions
  • Next by Date: Re: -saveDocument: and package problems
  • Previous by thread: *** -[NSCFDictionary setObject:forKey:]: mutating method sent to immutable object
  • Next by thread: Re: *** -[NSCFDictionary setObject:forKey:]: mutating method sent to immutable object
  • Index(es):
    • Date
    • Thread