Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Duke Leto

macrumors regular
Original poster
Mar 17, 2008
166
0
I have some code where there is one array that I add objects to. When I do it, it works. Now I have another array, initialized and created in a very similar way, that will run through addObject (i check this with breakpoints), what I am adding is not null, and its length is still 0. It is an NSMutableArray, and it is synthesized, so where did I go wrong?

BTW, it still does not add the object even when I make it add a string, like this:
[myArray addObject:mad:"test"];
 

mongrol

macrumors regular
Jul 16, 2007
232
0
Need code or we can't tell what you're doing wrong.

Are you sure you're instantiating the array? It's not enough to declare it.
 

Duke Leto

macrumors regular
Original poster
Mar 17, 2008
166
0
I just made a fool of myself... I need to initialize it. ..

*puts on dunce cap and goes into hall of shame*
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.