• 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
Checking One Array Against Another?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Checking One Array Against Another?


  • Subject: Checking One Array Against Another?
  • From: Pierce Freeman <email@hidden>
  • Date: Fri, 28 Nov 2008 19:53:08 -0800
  • Thread-topic: Checking One Array Against Another?

Hi everyone.

I am attempting to check one array's contents against another's, but so far
it hasn't been working.  In the actual application, I am checking the
current open applications against an "okay" application list, and just
thought of another problem:  If the user chooses only has some open on the
list, it will return that the user has some open that is not on the list.
Some example code (with different variables) is below:

[CODE]
for (int arraySort = 0; arraySort < [arrayInfo count]; arraySort++)
            {
                for (int arrayNewSort = 0; arrayNewSort < [arrayNewInfo
count]; arrayNewSort++)
                {
                    if ([ arrayInfo objectAtIndex:arraySort] ==
[arrayNewInfo objectAtIndex:arrayNewSort])
                    {
                        some++;
                    }
                }
            }

If (some == [arrayNewInfo count]
{
    NSLog(@"The user has only the okay applications open");
}
[END CODE]

Thanks for any help.


Sincerely,

Pierce F.

--
Pierce Freeman
email@hidden



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Checking One Array Against Another?
      • From: Ken Thomases <email@hidden>
    • Re: Checking One Array Against Another?
      • From: Rob Keniger <email@hidden>
  • Prev by Date: Re: NSMutableDictionary Leak
  • Next by Date: Re: NSMutableArray vs NSArrayController
  • Previous by thread: RE: Simple Core Animation Problem
  • Next by thread: Re: Checking One Array Against Another?
  • Index(es):
    • Date
    • Thread