title: objective-c "mutating method sent to immutable object" error
body: <p>I'm pretty new to objective-c and try to create a small app for the iphone.<br>
  I'm nearly done beside this little error here. Actually, I've searched hours with google to find a proper solution but unfortunately I'm not able to find a solution which works.<br>
  I'm using this tutorial here to build up an UITableView: <a href="http://knol.google.com/k/usman-ismail/iphone-sdk-using-table-views/34oprzanmpe7q/6#" rel="noreferrer">UITableView Tutorial</a>
  The full error message looks like this:</p>
  
  <blockquote>
    <p><strong>* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '*</strong> -[NSCFArray insertObject:atIndex:]: mutating method sent to immutable object'</p>
  </blockquote>
  
  <p>This is the Data Controller Header:
  MyLinksDataController.h</p>
  
  <pre><code>@interface MyLinksDataController : NSObject {
  
  NSMutableArray *tableList; //&lt;---important part
  
  }
  
  - (unsigned)countOfList;
  - (id)objectInListAtIndex:(unsigned)theIndex;
  - (void)addData:(NSString *)data; //&lt;---important part
  - (void)removeDataAtIndex:(unsigned)theIndex;
  
  @property (nonatomic, copy, readwrite) NSMutableArray *tableList; //&lt;---important part
  
  .....
  </code></pre>
  
  <p>And the Data Controller Method:
  MyLinksDataController.m</p>
  
  <pre><code>#import "MyLinksDataController.h"
  
  @implementation MyLinksDataController
  
  @synthesize tableList;
  
  - (id)init {
  
      if (self = [super init]) {
  
          NSLog(@"Initilizing DataController");
          //Instantiate list
          NSMutableArray *localList = [[NSMutableArray alloc] init];
          self.tableList = [localList copy];
          [localList release];
  
          //Add initial Data
          [self addData:@"AAAAAAAAAAAAAA"];
          [self addData:@"BBBBBBBBBBBBBB"];
  
      }
  
      return self;
  
  }
  </code></pre>
  
  <p>-------------------------------later on in the source code---------------------------------</p>
  
  <pre><code>- (void)addData:(NSString*)data; {
  
      [tableList addObject:data]; //&lt;---- here the app crashes
  
  }
  </code></pre>
  
  <p>I would pretty much appreciate any help.</p>
  
  <p>Thank you for your support in advance.</p>
  
  <p>Daniel</p>