Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 06-04-2011, 05:45 AM   #1 (permalink)
Registered Member
 
Join Date: Apr 2011
Posts: 40
chings228 is on a distinguished road
Default Tabbar Navigation Combination error

i'm trying to do this combination

by start with a tabbar controller

and then add a navigation controller in the interface builder

then add a uitable subclass

everything go fine , i.e , tabbar selection and push view for navigation bar

but the problem occurs if i click the navigation go back to the table view ,

the app will stop running or crash with this error

"Program received signal : "exc_bad_access"


and nothing , and i try to find in debugger windows

there a line highlighted

0x00f2809b <+0015> mov 0x8(%edx),%edi


could anyone help , thx a lot
chings228 is offline   Reply With Quote
Old 06-05-2011, 05:56 PM   #2 (permalink)
Junior Member
iPhone Dev SDK Supporter
 
Join Date: May 2011
Location: Orleans, MA
Posts: 7
in2it is on a distinguished road
Send a message via Skype™ to in2it
Default

perhaps u shud post up relevant code
in2it is offline   Reply With Quote
Old 06-07-2011, 03:09 AM   #3 (permalink)
Registered Member
 
Join Date: Apr 2011
Posts: 40
chings228 is on a distinguished road
Default

Quote:
Originally Posted by in2it View Post
perhaps u shud post up relevant code
finally i found that a code which will make the program crash , but i have no idea what's wrong

Code:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    // Navigation logic may go here. Create and push another view controller.
    
    DataDetail *detailViewController = [[DataDetail alloc] initWithNibName:@"DataDetail" bundle:nil];
     // ...
     // Pass the selected object to the new view controller.
    
	//NSString *textTemp = [NSString stringWithFormat:@"%@",[viewArray objectAtIndex:[indexPath row]]];
	


	
    detailViewController.message = [viewArray objectAtIndex:indexPath.row];
message has been declared at datadetail.h already 


but if i add this

detailViewController.title = textTemp
// the program will crash when i back to the table view immediately 
// but the title show properly  at  datadetail.nib . 








	//[textTemp release];
	
	
	[self.navigationController pushViewController:detailViewController animated:YES];
    [detailViewController release];
    
}

Last edited by chings228; 06-07-2011 at 11:52 AM. Reason: add code tag
chings228 is offline   Reply With Quote
Old 06-07-2011, 11:29 AM   #4 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

use tag code when you post code....

[code] insert your code here [/ code]

produce
Code:
 insert your code here
__________________
dany_dev is offline   Reply With Quote
Old 06-07-2011, 10:38 PM   #5 (permalink)
Junior Member
iPhone Dev SDK Supporter
 
Join Date: May 2011
Location: Orleans, MA
Posts: 7
in2it is on a distinguished road
Send a message via Skype™ to in2it
Default

Quote:
Originally Posted by chings228 View Post
finally i found that a code which will make the program crash , but i have no idea what's wrong

Code:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    // Navigation logic may go here. Create and push another view controller.
    
    DataDetail *detailViewController = [[DataDetail alloc] initWithNibName:@"DataDetail" bundle:nil];
     // ...
     // Pass the selected object to the new view controller.
    
	//NSString *textTemp = [NSString stringWithFormat:@"%@",[viewArray objectAtIndex:[indexPath row]]];
	


	
    detailViewController.message = [viewArray objectAtIndex:indexPath.row];
message has been declared at datadetail.h already 


but if i add this

detailViewController.title = textTemp
// the program will crash when i back to the table view immediately 
// but the title show properly  at  datadetail.nib . 








	//[textTemp release];
	
	
	[self.navigationController pushViewController:detailViewController animated:YES];
    [detailViewController release];
    
}

i notice that this line is missing:
[self.tableView deselectRowAtIndexPath:indexPath animated:YES];

and perhaps it should be more like this:


DataDetail *aDetail = [self dataDetailForIndexPath:indexPath];

DetailViewController *detailController = [[DetailViewController alloc] init];

detailController.detail = aDetail;

[self.navigationController pushViewController:detailController animated:YES];

[detailController release];
in2it is offline   Reply With Quote
Reply

Bookmarks

Tags
combination, exc_bad_acces, uitabbar, uitableview

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 328
5 members and 323 guests
Dnnake, iOS.Lover, jenniead38, pbart, Wikiboo
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,663
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, LezB44
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:18 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0