On Aug 3, 2011, at 6:38 PM, Kevin Bracey wrote:

> NSMutableArray *someInfo = [NSArray arrayWithObjects:@"made" , @"it", 
> @"across",. nil];

Did you really want to create an NSArray (non-mutable) and then pass it off as 
an NSMutableArray? Since you mentioned ARC, I'm surprised the compiler didn't 
flag the type mismatch. You might have better luck creating the NSMutableArray 
that your completion routine seems to be expecting:

        NSMutableArray *someInfo = [NSMutableArray arrayWithObjects:@"made" , 
@"it", @"across",. nil];

        [holdAlert beginSheetModalForWindow:[self window] modalDelegate:self 
didEndSelector:@selector( 
                alertDidEnd:returnCode:contextInfo: ) contextInfo:someInfo;


        -(void)alertDidEnd:(NSAlert *)alert returnCode:(int)returnCode  
contextInfo:(void  *)contextInfo
        {
                NSMutableArray *holdArray = (NSMutableArray*)contextInfo;
                ...
        }

Or, if the array doesn't really need to be mutable, use NSArray throughout. The 
only reason to make it mutable would be so the completion handler could use it 
to pass information back, but of course it has the delegate itself for that.

Or, use a block. That might be simpler 
still._______________________________________________

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

Reply via email to