title: What happens to an NSArray object when encoding?
body: <p>I'm building an application that utilises NSCoding to save NSObject's to a documentPath.
  I'm having no issues doing this, I'm just curious about something.</p>
  
  <p>I have MACompany, which implements NSCoding delegate methods.</p>
  
  <pre><code>- (void) encodeWithCoder:(NSCoder *)encoder {
  
       [encoder encodeObject:address_1 forKey:kAddress_1];
       [encoder encodeObject:address_2 forKey:kAddress_2];
       [encoder encodeObject:city_town forKey:kCity_Town];
       [encoder encodeObject:company_name forKey:kCompany_Name];
       [encoder encodeObject:country forKey:kCountry];
       [encoder encodeObject:date_added forKey:kDate_Added];
       [encoder encodeObject:fax forKey:kFax];
       [encoder encodeObject:parent_company_website forKey:kWebsite];
       [encoder encodeObject:postal_code forKey:kPostal_Code];
       [encoder encodeObject:state_province forKey:kState_Province];
       [encoder encodeObject:type forKey:kType];
  
       [encoder encodeObject:stores forKey:kStores]; //NSArray of custom NSObjects
  
  }
  </code></pre>
  
  <p>As you can see, I have a NSArray of custom NSObjects (MAStore). Each one of these objects also implements the same NSCoding what not.</p>
  
  <p>However, my question is, when I call <code>encodeWithCoder:(NSCoder *)encoder</code> method in MAStore, and it gets to the <code>[encoder encodeObject:stores forKey:kStores]</code>, will all the objects stored within the <code>stores</code> NSArray have the <code>encoderWithCoder:(NSCoder *)encoder</code> method called if implemented?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>The reason I'm asking this is that I want to know whether or not it'll work before I invest time in doing such a thing. I have multiple custom NSObjects with NSArrays that hold more custom NSObjects. It would be a long process to find that it doesn't work.</p>