title: NSInteger and decodeInteger:forKey: Problems
body: <p>I have the following two archiving methods:</p>
  
  <pre><code>    - (void) encodeWithCoder: (NSCoder *) encoder {
      [encoder encodeObject:self.exercises forKey:@"exercises"];
      [encoder encodeObject:self.title forKey:@"title"];
      [encoder encodeObject:self.description forKey:@"description"];
      [encoder encodeInteger:self.idnum forKey:@"idnum"];
      [encoder encodeInteger:self.rating forKey:@"rating"];
      [encoder encodeInteger:self.frequency forKey:@"frequency"];
      NSLog(@"Encoding!");
  
  }
  
  - (id) initWithCoder: (NSCoder *) decoder {
      self.exercises =   [[decoder decodeObjectForKey:@"exercises"] retain];
      self.title =       [[decoder decodeObjectForKey:@"title"] retain];
      self.description = [[decoder decodeObjectForKey:@"description"] retain];
      self.idnum =       [[decoder decodeIntegerForKey:@"idnum"] retain];
      self.rating =      [[decoder decodeIntegerForKey:@"rating"] retain];
      self.frequency =   [[decoder decodeIntegerForKey:@"frequency"] retain];
      NSLog(@"Decoding!");
      return self;
  }
  </code></pre>
  
  <p>And a header:</p>
  
  <pre><code>    @interface Workout : NSObject{
  
      NSMutableArray *exercises; 
      NSString *title;
      NSString *description;
      NSInteger idnum;
      NSInteger rating;
      NSInteger frequency;
  }
  
  - (void) encodeWithCoder: (NSCoder *) encoder;
  - (id) initWithCoder: (NSCoder *) decoder;
  
  @property(nonatomic,retain) NSMutableArray *exercises; 
  @property(nonatomic,retain) NSString *title;
  @property(nonatomic,retain) NSString *description;
  @property(nonatomic) NSInteger idnum;
  @property(nonatomic) NSInteger rating;
  @property(nonatomic) NSInteger frequency;
  @end
  </code></pre>
  
  <p>It seems simple enough. encodeInteger takes an NSInteger, which I pass to it, and decodeIntegerForKey returns an NSInteger, but I get this weird errors:</p>
  
  <p>warning: invalid receiver type 'NSInteger'</p>
  
  <p>and when the decodeIntegerForKey instruction is executed, I get an exec bad access. </p>
  
  <p>Why is this happening?</p>