xnakx
Oct 12, 2008, 02:36 AM
thephotoQueue = [[[NSOperationQueue alloc] init] autorelease];
[thephotoQueue setMaxConcurrentOperationCount:1];
NSInteger i;
for (i = 0; i <=kNumImages -1; i++)
{
NSInvocationOperation* thephotoOp = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(loadpropphotos:) object:i];
//Passing argument 3 of 'initwithTarget:selector:object' makes pointer from integer without cast
NSLog(@"Queuing new thread");
[thephotoQueue addOperation:thephotoOp];
}
loadpropphotos takes an int as an argument. everything works fine, but i am trying to clear the warnings out before i hand it over to my testers.
How would i pass an int to the selector?
[thephotoQueue setMaxConcurrentOperationCount:1];
NSInteger i;
for (i = 0; i <=kNumImages -1; i++)
{
NSInvocationOperation* thephotoOp = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(loadpropphotos:) object:i];
//Passing argument 3 of 'initwithTarget:selector:object' makes pointer from integer without cast
NSLog(@"Queuing new thread");
[thephotoQueue addOperation:thephotoOp];
}
loadpropphotos takes an int as an argument. everything works fine, but i am trying to clear the warnings out before i hand it over to my testers.
How would i pass an int to the selector?
