Linked Questions

3 votes
3 answers
10k views

NSMutableArray does not add objects [duplicate]

I think, I am doing a pretty basic mistake, but I am using an NSMutableArray and this somehow doesn't add the object, I'm sending it its way. I have a property (and synthesize) @property (nonatomic, ...
Luckystrik3's user avatar
0 votes
2 answers
1k views

Why does this array return 0 for an object count? [duplicate]

My array: NSMutableArray *squareLocations; CGPoint dotOne = CGPointMake(1, 1); [squareLocations addObject:[NSValue valueWithCGPoint:dotOne]]; CGPoint dotTwo = CGPointMake(10, 10); [squareLocations ...
Not My Name Car's user avatar
0 votes
1 answer
1k views

Blocks adding objects to an array...can't get it to work [duplicate]

I'm making an app which searches texts (enumerating through the whole text via a block method). The search controller class is supposed to compile the results into an array, which is then returned via ...
Reid's user avatar
  • 1,129
-1 votes
2 answers
3k views

can't figure out why NSMutableArray addObject is not working [duplicate]

Possible Duplicate: NSMutableArray addObject not working I have a NSMutableArray declared as (nonatomic,retain) in my .h file, and properly synthesized. tempRandomWord is an NSString that is ...
user1418214's user avatar
-1 votes
1 answer
1k views

NSMutableArray count equals 0 when add object [duplicate]

I have the next code: -(void)accountAdded:(GoogleMailAccount *)account { DLog(@"accountAdded %@ ",account.emailAddress); DLog(@"_accounts addObject %@ ",account); [_accounts addObject:...
pvllnspk's user avatar
  • 5,747
0 votes
2 answers
951 views

Adding UITextField input to NSMutableArray [duplicate]

I'm trying to add UITextField input into an NSMutableArray using the following IBActions, connected to the 'did end editing' part of the UITextFields: - (IBAction) returnKey1 { [textInputOne ...
Louis Holley's user avatar
-1 votes
2 answers
187 views

Objective C array not storing value [duplicate]

Forewarning: I'm going through the Itunes Stanford course for IOS, and I'm a complete noob with this language. I have this function in my "Deck.m" file. - (id)init { self = [super init]; if (self)...
volk's user avatar
  • 1,196
0 votes
2 answers
151 views

Adding items to NSMutableArray doesn't work [duplicate]

I'm taking the lectures of Stanford's iPhone application development and the first assignment is to build a RPN calculator. I'm having an issue that is probably something simple that I'm missing out. ...
gabsferreira's user avatar
  • 3,127
0 votes
1 answer
250 views

Objective-C : containsObject is always returning NO [duplicate]

I don't understand why, the containsObject method seems to always return NO, here is my method : -(void)addTockens:(NSString *)tockens { if ([tockens length] == 2 && ![self.tockensArray ...
Pop Flamingo's user avatar
  • 2,663
-2 votes
3 answers
143 views

How to add an object to a NSMutable array that is in a class? [duplicate]

I am trying to add an object of the same class to a NSMutable array that is defined in the same class. My approach would look like this, but when I tested the array, it was always empty. I also tried ...
schneebeutel's user avatar
0 votes
1 answer
151 views

Adding object to NSMutableArray or Converting Float to NSNumber [duplicate]

Having difficulties apparently with either adding elements to a NSMutableArray or to converting float to a NSNumber. Here is a working while loop that uses simple C arrays and not NSMutableArray. It ...
Mr_Vlasov's user avatar
  • 515
1 vote
2 answers
88 views

Objective C adding items to nsmutablearray returning nil [duplicate]

I am trying to add items from an NSArray to an NSMutableArray like so: for(int i = 0; i < [tableData count]; i++){ [purchaseOrder.objects addObject:[tableData objectAtIndex:i]]; ...
user979331's user avatar
  • 11.2k
0 votes
1 answer
111 views

Array is always empty [duplicate]

Possible Duplicate: NSMutableArray addObject not working I'm making an iPhone app, and so far, I'm receiving data from my server, creating objects using that data and filling an array with those ...
docaholic's user avatar
  • 625
0 votes
1 answer
84 views

Fetch Values from C-Struct in a NSMutableArray [duplicate]

This question has been asked a few times in SO, with the top two answers being: What's the best way to put a c-struct in an NSArray? How can I create an NSMutableArray of structs? The Apple ...
user2636834's user avatar
0 votes
1 answer
113 views

Filling an NSMutableArray with int values and then retriveing them [duplicate]

I'm integrating the BEMSimpleLineGraph library into my Objective-C iPhone app, and I'm having trouble adding int values from my Core Data to an NSMutableArray, and later retrieving the values in the ...
MacNick's user avatar
  • 24

15 30 50 per page