• 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: Finding out if an NSArray's contents are all equal
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding out if an NSArray's contents are all equal


  • Subject: Re: Finding out if an NSArray's contents are all equal
  • From: Ashley Clark <email@hidden>
  • Date: Sat, 22 Jul 2006 12:12:19 -0500

Check out isEqualToArray: in NSArray.

On Jul 22, 2006, at 10:09 AM, email@hidden wrote:

HI all,

I have category method added to NSArray that checks to see if its contents are all equal.
Basically the method just performs isEqual: to each item in the array comparing it to the first item, and if none return NO, then I return YES.
Otherwise I return NO.


What I'm wondering is, am I replicating any functionality in cocoa, that already exists? I'm curious if KVC cant be used to discover if an array
has all its objects the same value....


I just want to make sure, though I've looked around, I don't want to maintain code that is already been done by apple...

Thanks

Andre
email@hidden



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


Ashley Clark


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Finding out if an NSArray's contents are all equal
      • From: Andre <email@hidden>
References: 
 >Finding out if an NSArray's contents are all equal (From: email@hidden)

  • Prev by Date: objectDidEndEditing bug?
  • Next by Date: Re: Exception in NSTreeController:removeObjectAtArrangedObjectIndexPath
  • Previous by thread: Finding out if an NSArray's contents are all equal
  • Next by thread: Re: Finding out if an NSArray's contents are all equal
  • Index(es):
    • Date
    • Thread