Hi guys, I'm experiencing a hard issue here, would appreciate any, I mean ANY help =)
I'm a experienced developer by I'm new to Objective-C/iPhone/Cocoa.
I wanna create a class controller which I'm able to pass a NSMutableArray as a parameter.
Then, we have:
selTimeIntController = [[SingleSelectPickerViewController alloc] initWithSettings: listOfIntervals :kAlarmIntervalStr :myDataHolder.alarmInterval];
[self.navigationController pushViewController: selTimeIntController animated: YES];
[selTimeIntController release];
where this listOfIntervals is an already alloc/init NSMutableArray*.
on my SingleSelectPickerViewController, we have:
-(id)initWithSettings:(NSMutableArray*)sourceArray :(NSString*)viewCurrentValue :(NSString*)viewTitle {
if(self = [self initWithNibName: kNibName bundle: [NSBundle mainBundle]]) {
listOfIntervals = [NSMutableArray arrayWithArray: (NSMutableArray*)sourceArray];
currentValue = [[NSString alloc] initWithString: viewCurrentValue];
title = [[NSString alloc] initWithString: viewTitle];
}
return self;
}
Through debugging I'm able to see my listOfIntervals being created on my SingleSelectPickerViewController.
Here we have the SingleSelectPickerViewController' dealloc:
- (void)dealloc {
[super dealloc];
[listOfIntervals release];
[currentValue release];
[title release];
}
But, everytime I instantiate my SingleSelectViewController, I receive right afterwards an EXEC_BAD_ADDRESS with the following stack:
#0 0x96132688 in objc_msgSend ()
#1 0x00003ee2 in -[SingleSelectPickerViewController tableView:numberOfRowsInSection:] (self=0xd38940, _cmd=0x319a6bc0, tableView=0x102e000, section=0) at /Users/Cadu/iPhone/myApp/Classes/SingleSelectPickerViewController.m:115
#2 0x30a86bb4 in -[UISectionRowData refreshWithSection:tableView:tableViewRowData:] ()
#3 0x30a8879b in -[UITableViewRowData rectForFooterInSection:] ()
#4 0x30a883c7 in -[UITableViewRowData heightForTable] ()
#5 0x3094e8e6 in -[UITableView(_UITableViewPrivate) _updateContentSize] ()
#6 0x30940a7d in -[UITableView noteNumberOfRowsChanged] ()
#7 0x3094a2a0 in -[UITableView reloadData] ()
#8 0x30947661 in -[UITableView layoutSubviews] ()
#9 0x00b41d94 in -[CALayer layoutSublayers] ()
#10 0x00b41b55 in CALayerLayoutIfNeeded ()
#11 0x00b413ae in CA::Context::commit_transaction ()
#12 0x00b41022 in CA::Transaction::commit ()
#13 0x00b492e0 in CA::Transaction::observer_callback ()
#14 0x30245c32 in __CFRunLoopDoObservers ()
#15 0x3024503f in CFRunLoopRunSpecific ()
#16 0x30244628 in CFRunLoopRunInMode ()
#17 0x32044c31 in GSEventRunModal ()
#18 0x32044cf6 in GSEventRun ()
#19 0x309021ee in UIApplicationMain ()
#20 0x000020d8 in main (argc=1, argv=0xbffff0b8) at /Users/Cadu/iPhone/MyApp/
Any idea of what's going on?