title: Objective-C No getter method error
body: <p>I'm very new to Objective-C (and programming in general... I've only studied Python and a little bit of HTML). I am trying to learn from the tutorial <strong><a href="http://www.binpress.com/tutorial/learn-objectivec-objects-part-3-extending-the-fraction-class/62" rel="nofollow">here</a></strong> but I'm running into an error that I can't seem to get figured out.</p>
  
  <p>In Fraction.m, under - (void)add:(Fraction *)newFraction I'm getting the error "No getter method for read from property" on the next two lines.</p>
  
  <p>If anyone could help me out that would be great! Any suggestions are appreciated.</p>
  
  <p>Thanks,
  Adam</p>
  
  <p>CODE:</p>
  
  <p>FractionDemo.m</p>
  
  <pre><code>#import "Fraction.h"
  #import &lt;Foundation/Foundation.h&gt;
  
  int main(int argc, const char * argv[]) {
  @autoreleasepool {
  
      Fraction *aFraction = [[Fraction alloc] init];
      Fraction *bFraction = [[Fraction alloc] init];
  
      [aFraction setNumerator:1 overDenominator:2];
      [bFraction setNumerator:1 overDenominator:3];
  
      [aFraction display]; NSLog(@" + "); [bFraction display]; NSLog(@" = ");
      [aFraction add:bFraction];
      [aFraction display];
  
  }
  return 0;
  }
  </code></pre>
  
  <p>Fraction.h</p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  
  @interface Fraction : NSObject {
  NSInteger numerator;
  NSInteger denominator;
  }
  - (void)setNumerator:(NSInteger)value;
  - (void)setDenominator:(NSInteger)value;
  - (void)display;
  - (void)setNumerator:(NSInteger)num overDenominator:(NSInteger)denom;
  - (void)add:(Fraction *)newFraction;
  
  @end
  </code></pre>
  
  <p>Fraction.m</p>
  
  <pre><code>#import "Fraction.h"
  
  @implementation Fraction
  - (void)setNumerator:(NSInteger)value {
  numerator = value;
  }
  
  - (void)setDenominator:(NSInteger)value {
  denominator = value;
  }
  
  - (void)display {
  NSString *numeratorString = [[NSString alloc] initWithFormat:@"%ld", (long)numerator];
  NSString *denominatorString = [[NSString alloc] initWithFormat:@"%ld", (long)denominator];
  NSLog(@"%@/%@", numeratorString, denominatorString);
  }
  
  - (void)setNumerator:(NSInteger)num overDenominator:(NSInteger)denom {
  self.numerator = num;
  self.denominator = denom;
  }
  
  - (void)add:(Fraction *)newFraction {
  // a/b + c/d = ((a * d) + (b * c)) / (b * d)
  self.numerator = self.numerator * newFraction.denominator + self.denominator * newFraction.numerator;
  self.denominator = self.denominator * newFraction.denominator;
  }
  
  @end
  </code></pre>