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

Re: Checking One Array Against Another


  • Subject: Re: Checking One Array Against Another
  • From: Pierce Freeman <email@hidden>
  • Date: Sat, 29 Nov 2008 11:07:52 -0800
  • Thread-topic: Checking One Array Against Another

Okay... That makes sense. :)

Thanks for your (and everyone else's) help.


Sincerely,

Pierce F


On 11/29/08 10:58 AM, "Ashley Clark" <email@hidden> wrote:

> On Nov 29, 2008, at 12:47 PM, Pierce Freeman wrote:
>
>> NSMutableSet *openApplicationsSet = [NSSet
>> setWithArray:openApplications];
>
> While openApplicationsSet is declared to be an NSMutableSet you are
> not creating one. Your assignment should be [NSMutableSet
> setWithArray:...]
>
>
>> NSSet *allowedApplicationsSet = [NSSet
>> setWithArray:applicationsAllowedMutableArray];
>>
>> NSMutableSet *badApplicationsSet = [openApplicationsSet
>> minusSet:allowedApplicationsSet];
>
> The minusSet: method doesn't return a new object. It mutates the
> receiver, in this case openApplicationsSet, by removing items it
> shares in common with the passed in set, allowedApplicationsSet.
>
>> NSAlert * askToContinue = [NSAlert alertWithMessageText:@"Warning!"
>> defaultButton:@"Continue"
>> alternateButton:@"Quit"
>> otherButton:nil
>> informativeTextWithFormat:@"Quit %@.", badApplicationsSet];
>
>
>
> Ashley


_______________________________________________

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

References: 
 >Re: Checking One Array Against Another (From: Ashley Clark <email@hidden>)

  • Prev by Date: Re: Checking One Array Against Another
  • Next by Date: Re: Checking One Array Against Another
  • Previous by thread: Re: Checking One Array Against Another
  • Next by thread: Re: Checking One Array Against Another
  • Index(es):
    • Date
    • Thread