Why is my UITableView not being set?

Posted by Jamie L on Stack Overflow See other posts from Stack Overflow or by Jamie L
Published on 2010-05-02T04:15:46Z Indexed on 2010/05/02 4:27 UTC
Read the original article Hit count: 296

I checked using the debbuger in the viewDidLoad method and tracerTableView is 0x0 which i assume means it is nil. I don't understand. I should go ahaed say yes I have already checked my nib file and yes all the connections are correct. Here is the header file and the begging of the .m.

/////////////
.h file
////////////

@interface TrackerListController : UITableViewController {

// The mutable (modifiable) dictionary days holds all the data for the days tab
NSMutableArray *trackerList;
UITableView *tracerTableView;
}

@property (nonatomic, retain) NSMutableArray *trackerList;
@property (nonatomic, retain) IBOutlet UITableView. *tracerTableView;

//The addPackage: method is invoked when the user taps the addbutton created at runtime.

-(void) addPackage : (id) sender;

@end

///////////////////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////
.m file
//////////////////////////////////////

@implementation TrackerListController

@synthesize trackerList, tracerTableView;

  • (void)viewDidLoad {

    [super viewDidLoad];

    self.title = @"Package Tracker";

    self.navigationItem.leftBarButtonItem = self.editButtonItem;

UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self >action:@selector(addPackage:)];

// Set up the Add custom button on the right of the navigation bar self.navigationItem.rightBarButtonItem = addButton;

[addButton release]; // Release the addButton from memory since it is no longer needed

}

© Stack Overflow or respective owner

Related posts about iphone

Related posts about ipod-touch