title: NSObject doesn't support encodeWithCoder?
body: <p>I'm using encoding for the first time in order to save data out of my app. The examples I have been looking at say to call <code>[super encodeWithCoder:coder];</code> for custom classes. </p>
  
  <p>I have a class which extends <code>NSObject</code> but am getting the error msg below. Is this because <code>NSObject</code> is the base class and has nothing to encode?</p>
  
  <blockquote>
    <p>Receiver type 'NSObject' for instance message does not declare a method with selector 'encodeWithCoder:'</p>
  </blockquote>
  
  <pre><code>- (void)encodeWithCoder:(NSCoder *) coder 
  { 
  [super encodeWithCoder:coder]; //  &lt;-------------------------ERROR
  
  [coder encodeInt:noteIndex forKey:@"noteIndex"];
  [coder encodeCGRect:cellRect forKey:@"cellRect"];
  [coder encodeBool:noteOn forKey: @"noteOn"]; 
  [coder encodeInt:note forKey:@"note"]; 
  [coder encodeInt:velocity forKey:@"velocity"]; 
  [coder encodeInt:channel forKey:@"channel"];
  [coder encodeInt:releaseVelocity forKey:@"releaseVelocity"];
  [coder encodeFloat:duration forKey:@"duration"];
  }
  </code></pre>