title: How to define and call a method with multiple parameters
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1066763/how-to-write-a-method-message-with-multiple-parameters">How to write a method/message with multiple parameters?</a>  </p>
  </blockquote>
  
  
  
  <p>I am really confused here... I have looked at SO and Google where I found an example of calling a method with two parameters.  So I modified it for my use, and unfortunately I can't get it to work.  Here is my updated code:</p>
  
  <pre><code>-  definition of method
  - (NSArray *) fetchEventsBetweenDates: (NSDate *) sDate: andDate: (NSDate *) eDate;
  
  - definitions and creation of sD and eD
      //  convert start dates to NSDate
      NSDateFormatter* df = [[NSDateFormatter alloc] init];
      [df setDateFormat:@"MM/dd/yyyy"];
      NSDate* sD = [df dateFromString:@"10/03/2012"];
      NSLog(@"startDate: %@", sD);
  
      //  convert end dates to NSDate
      NSDate* eD = [df dateFromString:@"10/05/2012"];
      NSLog(@"endDate: %@", eD);
  
  - call to method
      [self.eventsList addObjectsFromArray:[self fetchEventsBetweenDates: sD andDate: eD]];
  
  - method
  - (NSArray *) fetchEventsBetweenDates: (NSDate *) sDate: andDate: (NSDate *) eDate  {
  </code></pre>
  
  <p>I have tried every permutation I think was reasonable, and it still will not build.  I am getting a "expected ':' on the call to the method.</p>
  
  <p>What am I doing wrong?</p>