I have an NSMutableArray which is storing a list of other arrays. And when i run the code.
NSLog(@"%@",[[appDelegate teamRoster]objectAtIndex:[indexPath.row]class])
It returns and tells me that i am looking at an Array,
however when i try to do the following
[selectedRowerView tempArray] = [[appDelegate teamRoster]objectAtIndex:[indexPath.row]];
The program errors out. Anyone have any ideas why this might be happening?
You have to understand that
[selectedRowerView tempArray]is actually a command / message that is being sent. In C++ equivalent, you are callingselectedRowerView->tempArray() = .... Which doesn’t make logical sense because you cannot make an assignment to a function.What you’re trying to do is set the tempArray. If you have the proper setters/getters set-up, you can just run:
selectedRowerView.tempArray = ...;Just make sure that tempArray has a
@propertyand is@synthesize‘d.