title: Question about isKindOfClass
body: <p>Please look at this code snipped</p>
  
  <pre><code>- (SoapRequest*)AddFlyData:(id)_target 
                      action:(SEL)_action 
                   sessionid:(int)sessionid 
                    datasets:(FlyNetArrayOfDataSet*)datasets
  {
      if ([datasets isKindOfClass:[FlyNetArrayOfDataSet class]]) {
          NSLog(@"Yeah");
      } else {
          NSLog(@"Not Yeah");
      }
  }
  </code></pre>
  
  <p>Why, when i look on my console, I get </p>
  
  <pre><code>2011-09-06 23:08:00.917 soap-test[2133:207] Not Yeah
  </code></pre>
  
  <p>I'm a beginner and I'm completely confused .. :s When I look in the Debugger, the variable type is SoapArray (who is the parent class of FlyNetArrayOfDataSet). </p>
  
  <p>I used a method from SoapArray to initiate my instance of 'datasets', that means the class is automatically defined as Soap and not as FlyNetArrayOfDataSet ?!</p>
  
  <p>Thank you</p>
  
  <p>EDIT: I made a mistake, it's not NSArray but it inherits from SoapArray</p>
  
  <p>This is the header file of the class FlyNetArrayOfDataSet</p>
  
  <pre><code>#import "Soap.h"
  
  @interface FlyNetArrayOfDataSet : SoapArray
  {
  }
  
  + (NSMutableString*) serialize: (NSArray*) array;
  
  @end
  </code></pre>
  
  <p>But that didn't explain me why isKindOfClass returns false ..</p>
  
  <p>EDIT2: Ok I have the response of my question..</p>
  
  <p>I used this method to initialize my instance</p>
  
  <pre><code>FlyNetArrayOfDataSet * arr = [FlyNetArrayOfDataSet arrayWithObject:data];
  </code></pre>
  
  <p>This is a static method of the superclass SoapArray that create an instance of SoapArray (Helper) .. but not an instance of FlyNetArrayOfDataSet (!)</p>
  
  <p>Look at its implementation : </p>
  
  <pre><code>+ (id)arrayWithObjects:(id)firstObj, ...{
      SoapArray* a = [SoapArray array];
      id eachObject;
      va_list argumentList;
      if (firstObj) {
          [a.items addObject: firstObj];
          va_start(argumentList, firstObj);
          while (eachObject = va_arg(argumentList, id)) {
              [a.items addObject: eachObject];
          }
          va_end(argumentList);
      }
      return a;
  }
  </code></pre>
  
  <p>If I initialize my instance like this</p>
  
  <pre><code>FlyNetArrayOfDataSet * arr = [[FlyNetArrayOfDataSet alloc] init];
  </code></pre>
  
  <p>It's work perfectly and the method isKindOfClass return true :-)</p>