Worked like a charm. Here’s my code in case someone else finds themselves down this road. This is part of an app where I am automatically laying out ads in a magazine but it can easily be modified for a lot of uses. :
.h file:
#import <Cocoa/Cocoa.h>
@interface AppController : NSObject{
IBOutlet id btnStart;
}
(IBAction)GetArrayData:(id)sender; @end
.m file:
@implementation AppController
(IBAction)GetArrayData:(id)sender {
int a=10;
int b=10;
int c=20;
int d=20;
int row=0;
int col=0;
NSMutableArray* e = [[NSMutableArray alloc] init];
NSMutableArray* f = [[NSMutableArray alloc] init];
//check to see if f contains items from e
for(NSString* thisset in f) {
if ([e containsObject: thisset]) {
NSLog(@“This set (%@) is already being used.”, thisset);
} else {
NSLog(@“We can start the ad at these coordinates: %@”, thisset);
break;
}
}