Correct way to use contextInfo with ARC
Correct way to use contextInfo with ARC
- Subject: Correct way to use contextInfo with ARC
- From: Kevin Bracey <email@hidden>
- Date: Thu, 04 Aug 2011 13:38:10 +1200
Hi All,
A case of me not grasping C or/and ARC;-)
I'm trying to pass the NSMutableArray across the void to the didEndSelector so I can access it if the user clicks ok.
/snippits
NSMutableArray *someInfo = [NSArray arrayWithObjects:@"made" , @"it", @"across",. nil];
[holdAlert beginSheetModalForWindow:[self window] modalDelegate:self didEndSelector:@selector( alertDidEnd:returnCode:contextInfo: ) contextInfo:?how to send someInfo?];
-(void)alertDidEnd:(NSAlert *)alert returnCode:(int)returnCode contextInfo:(void *)contextInfo
{
// not happy maybe use a sheet and block
NSMutableArray *holdArray = ?contextInfo?;
what magic do I use to pass it in and get it out;-)
cheers
Kevin_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden