views:

26

answers:

3

Hello there,

I'm having the following issue:

I have a tab-style app. Eacht tab has its own viewcontroller and xip. Within the first tab-view, I try to display a button which load a next view, showing a grouped tableView. Everything works as expected, the numberofSectionsInTableView is called, and then I get an ext_bad_access error.

I try to explain my setup:

First (by the click of a button), I load the nip of the view:

FiltersViewController *filtersViewController = [[FiltersViewController alloc] initWithNibName:@"Filters" bundle:[NSBundle mainBundle]];
[self.navigationController pushViewController:filtersViewController animated:YES];
[filtersViewController release];

In the NIB, the File's-Owner is set to the FiltersViewController class. The view-outlet is connected to the tableView, which is of class UITableView. The TableView itself is sitting in the FiltersViewController object.

The FiltersViewController has the following interface:

@interface FiltersViewController : UITableViewController <UITableViewDelegate, UITableViewDataSource> {}

The tableView's delegate and dataSource is connected to the File's-Owner. I implemented the required methods for table-setup...

What am I missing? I've read that ext_bad_access has to to with accessing pointers / objects that are no longer existing. I followed the basic rules for memory management, and cannot find an error in the code.

Help is really appreciated. pawi

A: 

Ha! I got it!

I got the tableView's delegate and dataSource connected to the TableViewController (of type FiltersViewController) instead to the File's-Owner...

This was lucky, it got me busy for over a day now. :-(

Cheerz!

pawi
A: 

You mean EXEC_BAD_ACCESS right?

It basically means you are trying to access an object which isn't there. like 15th object of an array which has only 10 objects for example.

Most probably you've done it in cellForRowAtIndexPath method where you're populating the table view cells.

lukya
A: 

try to set the break points any where that feel incomplete, such as u can set the break points on numberOfSection, build and debug it, so you know where u have to change..

Imam Arief W
thx for your answer. Got it solved long time ago ;-) (See my second post). Cheerz
pawi