Re: Checking One Array Against Another?

2008-11-29 Thread Ken Thomases
On Nov 28, 2008, at 9:53 PM, Pierce Freeman wrote: for (int arraySort = 0; arraySort < [arrayInfo count]; arraySort++) { for (int arrayNewSort = 0; arrayNewSort < [arrayNewInfo count]; arrayNewSort++) { if ([ arrayInfo objectAtIndex:arr

Re: Checking One Array Against Another

2008-11-29 Thread Graff
On Nov 29, 2008, at 1:00 PM, Pierce Freeman wrote: The only problem with running that is that I get a error in the log and it doesn't seem to be working: -[NSCFSet minusSet:]: mutating method sent to immutable object My slightly modified code is below: NSMutableSet *openApplicationsSet = [N

Re: Checking One Array Against Another

2008-11-29 Thread Graff
On Nov 29, 2008, at 1:00 PM, Pierce Freeman wrote: The only problem with running that is that I get a error in the log and it doesn't seem to be working: -[NSCFSet minusSet:]: mutating method sent to immutable object My slightly modified code is below: NSMutableSet *openApplicationsSet = [N

Re: Checking One Array Against Another

2008-11-29 Thread Pierce Freeman
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 PROTECTED]> wrote: > On Nov 29, 2008, at 12:47 PM, Pierce Freeman wrote: > >> NSMutableSet *openApplicationsSet = [NSSet >> setWithArray:openApplications

Re: Checking One Array Against Another

2008-11-29 Thread Ashley Clark
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 *allowedA

Re: Checking One Array Against Another

2008-11-29 Thread Pierce Freeman
I may be totally wrong about this, but I think it said that it takes something away from the Mutable Array, and that it doesn't necessarily return anything... As I said, I may be totally wrong about this though. ;) Sincerely, Pierce F. On 11/29/08 10:37 AM, "Charles Steinman" <[EMAIL PROTECTE

Re: Checking One Array Against Another

2008-11-29 Thread Pierce Freeman
NSMutableSet *openApplicationsSet = [NSSet setWithArray:openApplications]; NSSet *allowedApplicationsSet = [NSSet setWithArray:applicationsAllowedMutableArray]; NSMutableSet *badApplicationsSet = [openApplicationsSet minusSet:allowedApplicationsSet]; NSAlert * askToContinue = [NSAlert alertWithM

Re: Checking One Array Against Another

2008-11-29 Thread Klaus Backert
On 29.11.2008, at 19:30, Pierce Freeman wrote: Klaus: For whatever reason, Xcode is telling me that "error: void value not ignored as it ought to be" when I try to make badApplicationsSet a mutable set. Please. Show. Your. Code. Klaus ___ C

Re: Checking One Array Against Another

2008-11-29 Thread Charles Steinman
--- On Sat, 11/29/08, Pierce Freeman <[EMAIL PROTECTED]> wrote: > For whatever reason, Xcode is telling me that "error: > void value not ignored > as it ought to be" when I try to make > badApplicationsSet a mutable set. Take a look at the documentation for -[NSMutableSet minusSet:]. Specificall

Re: Checking One Array Against Another

2008-11-29 Thread Pierce Freeman
Klaus: For whatever reason, Xcode is telling me that "error: void value not ignored as it ought to be" when I try to make badApplicationsSet a mutable set. Sincerely, Pierce F. On 11/29/08 10:22 AM, "Klaus Backert" <[EMAIL PROTECTED]> wrote: > > On 29.11.2008, at 19:00, Pierce Freeman wro

Re: Checking One Array Against Another

2008-11-29 Thread Klaus Backert
On 29.11.2008, at 19:00, Pierce Freeman wrote: The only problem with running that is that I get a error in the log and it doesn't seem to be working: -[NSCFSet minusSet:]: mutating method sent to immutable object My slightly modified code is below: NSMutableSet *openApplicationsSet = [NSSe

Re: Checking One Array Against Another

2008-11-29 Thread Pierce Freeman
The only problem with running that is that I get a error in the log and it doesn't seem to be working: -[NSCFSet minusSet:]: mutating method sent to immutable object My slightly modified code is below: NSMutableSet *openApplicationsSet = [NSSet setWithArray:openApplications]; NSSet *allowedAppl

Re: Checking One Array Against Another

2008-11-28 Thread Graff
On Nov 28, 2008, at 9:59 PM, Pierce Freeman wrote: Would there be some way using the NSSet method to output a list of the applications that the user needs to close in order for the current applications to be "in the good list"? You can use the NSMutableSet method minusSet: NSSet *allo

Re: Checking One Array Against Another

2008-11-28 Thread Graff
On Nov 28, 2008, at 8:25 PM, Pierce Freeman wrote: 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

Re: Checking One Array Against Another

2008-11-28 Thread Pierce Freeman
Would there be some way using the NSSet method to output a list of the applications that the user needs to close in order for the current applications to be "in the good list"? Sincerely, Pierce Freeman -- Pierce Freeman [EMAIL PROTECTED] On 11/28/08 9:28 PM, "Adam R. Maxwell" <[EMAIL PROT

Re: Checking One Array Against Another?

2008-11-28 Thread Rob Keniger
On 29/11/2008, at 1:53 PM, Pierce Freeman wrote: 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 a

Re: Checking One Array Against Another

2008-11-28 Thread Pierce Freeman
Adam: Sorry, I think that I didn't clearly state what I was asking. ;) My problem, not yours... Anyway, I am wondering if NSSet could deal with the fact that there wasn't an entry in one array that is in the other array. Example: The user has open Safari, Firefox, and Mail The allowed applicati

Re: Checking One Array Against Another

2008-11-28 Thread Adam R. Maxwell
On Nov 28, 2008, at 9:21 PM, Pierce Freeman wrote: Thanks for the help, and for the link. Just wondering though, how could I tell it to run a script if they were not equal, and if the open list is lacking some of the ones in the okay list? How could you tell /what/ to run a script? If y

Re: Checking One Array Against Another

2008-11-28 Thread Pierce Freeman
Thanks for the help, and for the link. Just wondering though, how could I tell it to run a script if they were not equal, and if the open list is lacking some of the ones in the okay list? Sincerely, Pierce Freeman -- Pierce Freeman [EMAIL PROTECTED] On 11/28/08 9:05 PM, "Adam R. Maxwell"

Re: Checking One Array Against Another

2008-11-28 Thread Adam R. Maxwell
On Nov 28, 2008, at 8:41 PM, Pierce Freeman wrote: Adam: Would this work even if the two arrays weren't in the same order? The documentation for NSSet explains this. http://developer.apple.com/documentation/cocoa/conceptual/collections/Articles/Sets.html smime.p7s Description: S/MIME cry

Re: Checking One Array Against Another

2008-11-28 Thread Pierce Freeman
Adam: Would this work even if the two arrays weren't in the same order? Sincerely, Pierce F -- Pierce Freeman [EMAIL PROTECTED] On 11/28/08 8:35 PM, "Adam R. Maxwell" <[EMAIL PROTECTED]> wrote: > > On Nov 28, 2008, at 8:25 PM, Pierce Freeman wrote: > >> Hi everyone. >> >> I am attempt

Checking One Array Against Another

2008-11-28 Thread Pierce Freeman
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 doesn't have an application

Checking One Array Against Another?

2008-11-28 Thread Pierce Freeman
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