title: Overriding isEqual: method but it is not called when removing object from array
body: <p>I'm using xCode 4.2, and going through the book "Programming in Objective C 2.0"</p>
  
  <p>There is an exercise that involves implementing <code>isEqual:</code> method from the <code>NSObject</code> class.</p>
  
  <p>The book says that the <code>isEqual:</code> method is triggered when the <code>removeObjectIdenticalTo:</code> method of the <code>NSArray</code> class is called. <code>removeObjectIdenticalTo:</code> ends up sending <code>isEqual:</code> message to all array members.</p>
  
  <p>When I'm trying to implement this <code>isEqual:</code> method in my class <code>AddressCard</code>, and I use <code>removeObjectIdenticalTo:</code>, passing an object that is an instance of <code>AddressCard</code> class, however, my <code>isEqual:</code> method is not getting called. Although if I just use the <code>isEqual:</code> method on an instance of <code>AddressCard</code> explicitly, it does work.</p>
  
  <p>Here is my <code>isEqual:</code> method from the AddressCard.m file</p>
  
  <pre><code>-(BOOL)isEqual: (id)object {
      NSLog(@"I got called");
      return NO;
  }
  </code></pre>
  
  <p>When this code is fired in AddressBook.m</p>
  
  <pre><code>-(void) removeCard: (AddressCard *) theCard {
      [book removeObjectIdenticalTo: theCard];
  }
  </code></pre>
  
  <p>the <code>isEqual:</code> method listed above is not called. </p>
  
  <p>I feel like I'm missing something important, but from all I've read and I know, I think that <code>isEqual:</code> MUST be called, unless <code>removeObjectIdenticalTo:</code> does not involve it anymore.</p>
  
  <p>I have all respective methods defined in .h files too.</p>