Hello, all ... I'm stumped as to why this generates a warning when I compile. Do I need to do something special with my AVURLAsset * to be able to access it from inside the block in order to add it to an NSInvocation?
for (int index = 0; index < [assetsToLoad count]; index ++) { NSURL *streamURL = [assetsToLoad objectAtIndex:index]; AVURLAsset *asset = [AVURLAsset URLAssetWithURL:streamURL options:nil]; NSString *tracks = @"tracks"; [asset loadValuesAsynchronouslyForKeys:[NSArray arrayWithObject:tracks] completionHandler:^ { SEL sel = @selector(setupPlayerForAsset:withIndex:); NSMethodSignature *sig = [self methodSignatureForSelector:sel]; NSInvocation *inv = [NSInvocation invocationWithMethodSignature:sig]; NSNumber *invNumber = [NSNumber numberWithInt:index]; [inv setTarget:self]; [inv setSelector:sel]; [inv setArgument:&asset atIndex:2]; // warning: passing argument 1 of 'setArgument:atIndex:' discards qualifiers from pointer target type [inv setArgument:&invNumber atIndex:3]; [inv retainArguments]; [inv performSelectorOnMainThread:@selector(invoke) withObject:nil waitUntilDone:YES]; [self performSelectorOnMainThread:sel withObject:asset waitUntilDone:YES]; }]; } } Regards, John _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com