• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSDictionary objectForKey and non-standard key classes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDictionary objectForKey and non-standard key classes


  • Subject: Re: NSDictionary objectForKey and non-standard key classes
  • From: email@hidden
  • Date: Tue, 28 Aug 2001 17:58:22 +0200

- (BOOL) isEqual:(id)otherValue {
return [value isEqual:otherValue];
}

This doesn't seem quite right. "otherValue" would be an instance of Skeleton, but you should pass the string it contains instead:

- (BOOL) isEqual:(id)otherValue {
return [value isEqual: [otherValue stringValue] ];
}


If that doesn't work, you could try using isEqualToString: which is another method of NSString which according to the documentation is also faster than isEqual:

Drew McCormack


  • Prev by Date: Re: Drawing rounded rect
  • Next by Date: Re: Notifications
  • Previous by thread: Re: NSDictionary objectForKey and non-standard key classes
  • Next by thread: Re: NSDictionary objectForKey and non-standard key classes
  • Index(es):
    • Date
    • Thread