views:

25

answers:

1

I'm trying to do some simple assignment, but coming up with different results and I can't figure out why. Why does the first assignment below work and the second one not?

NSMutableArray *mutableFetchResults = something approrpriate here;
[self  setLocationsArray:mutableFetchResults];
[switchViewController setLocationsArray:mutableFetchResults];

NSLog(@"1 - %@", self.locationsArray); // -> returns array
NSLog(@"2 - %@", switchViewController.locationsArray); // -> returns null
NSLog(@"3 - %@", mutableFetchResults); // -> returns array
+3  A: 

I bet switchViewController is nil.

Thomas Clayson
Ugh. This was it. For some awesome reason I had the init commented out. Gracias.
CJ