Note that there are some explanatory texts on larger screens.

plurals
  1. POmemory management issue with NSIndexPath
    primarykey
    data
    text
    <p>So currently I am attempting to save an indexPath and access it, yet I keep receiving the EXC_BAD_ACCESS error, and when I use the Analyze tool in xcode, it says that the value stored to my indexPath during its initialization is never read. Can anybody help and tell me what's going wrong here?</p> <p>Method to set indexPath:</p> <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSURL *requestURL = [[NSURL alloc] initWithString:@"URL"]; //The request ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:requestURL]; request.userInfo = [NSDictionary dictionaryWithObjectsAndKeys:indexPath,@"indexPath", nil]; [request setDelegate:self]; [request startAsynchronous]; [requestURL release]; [request release]; } </code></pre> <p>Method to access indexPath:</p> <pre><code>-(void)requestFinished:(ASIHTTPRequest *)request{ UIImage *foodImage = [[UIImage alloc] initWithData:[request responseData]]; NSIndexPath *indexPath = [request.userInfo objectForKey:@"indexPath"]; FoodDescription *detailViewController = [[FoodDescription alloc] initWithNibName:@"FoodDescription" bundle:nil]; // pass the food detailViewController.aFood = [[NSMutableDictionary alloc] initWithDictionary:[_foodArray objectAtIndex:indexPath.row]]; detailViewController.foodPicture = foodImage; detailViewController.restaurantName = _restaurantName; // Pass the selected object to the new view controller. [self.navigationController pushViewController:detailViewController animated:YES]; [detailViewController release]; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload