jeudi 15 mai 2014

NSMutable Array can't be used outside when another variable can be used


Vote count:

0




Wow that question sounds really weird.


But i couldn't find an answer and i haven't slept for the past 50 hours.


I defined NSMutableArray in .h file and synthesized in .m


initialized it with alloc init


if ([suppliesSet containsObject:word]) { ++count;



candidateLineTemp=candidateLine;




[denemeMutable addObject:candidateLineTemp];

NsLog(@"%@",denemeMutable);

// break;


This is where i add elements to it and and i can see the right content in NSLog


count and denemeMutable getting their content in the same place and i can use count without a problem.



if ((int2 - count)== 1)



{

if (denemeMutable=NULL) {
NSLog(@"Its empty bran");
}else
{

NSLog(@"Not empty lets go");

//
NSLog(@"First array %@\nDeneme Mutable %@",recipeIngredientsArray,denemeMutable);

NSArray *newArray=[recipeIngredientsArray arrayByAddingObjectsFromArray:denemeMutable];


The weird part i get to the not null part and i got



Deneme Mutable (null) this in the console.


there is almost no between points and i m definitely not erasing or reallocating the array.


any idea?



asked 1 min ago






Aucun commentaire:

Enregistrer un commentaire