tags:

views:

23

answers:

1
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
   MaSystemGuiAppDelegate *appDelegate = (MaSystemGuiAppDelegate *)[[UIApplication sharedApplication] delegate];

   appDelegate.deneme = [tableData objectAtIndex:indexPath.row] ;
   NSLog(@"my row", appDelegate.deneme); // THIS IS NOT PRINTING**
   NSLog(@"my row = %@", [tableData objectAtIndex:indexPath.row]); //THIS IS PRINTING THE VALUE ON CONSOLE**
   NSInteger row = [indexPath row];
   if(self.searchDetailViewController == nil){
      SearchDetailViewController *asearchDetail = [[SearchDetailViewController alloc] initWithNibName:@"SearchDetailView" bundle:nil];
      self.searchDetailViewController = asearchDetail;
      [asearchDetail release];
}
   searchDetailViewController.title = [NSString stringWithFormat:@"%@", [searchArray objectAtIndex:row]];
   MaSystemGuiAppDelegate *delegate = [[UIApplication sharedApplication] delegate];
   [delegate.searchNavController pushViewController:searchDetailViewController animated:YES];   
}

deneme is a NSMutableArray which is declared in MaSystemGuiAppDelegate.h. It's instatiated with: [[NSMutableArray alloc]init]; in the applicationDidFinishLaunching method in MaSystemGuiAppDelegate.m.

In the code above, [tableData objectAtIndex:indexPath.row] is retrieving one of the values touched on tableview. When I put that value in deneme (as you can see in the code) nothing gets printed.

What am I missing?

+1  A: 

Try this:

NSLog(@"my row: %@", appDelegate.deneme);

You need to tell NSLog that you want to print the parameters you are passing to it and what the format of those parameters are.

ericgorr
very thanks i am always missing those bit things .. well.. how can i pass that value to another view controller implementation class ? Actually it is real question for me for 2 weeks... because I tried all possibilities.
I achieved at the end ... :D :) I am happy now