Note that there are some explanatory texts on larger screens.

plurals
  1. PONSMutabel 2 dimensional array not working
    primarykey
    data
    text
    <p>i'm pulling a 2 dimensional array from a remote server:</p> <pre><code>- (NSMutableArray*)qBlock{ NSURL *url = [NSURL URLWithString:@"http://wsome.php"]; NSError *error; NSStringEncoding encoding; NSString *response = [[NSString alloc] initWithContentsOfURL:url usedEncoding:&amp;encoding error:&amp;error]; const char *convert = [response UTF8String]; NSString *responseString = [NSString stringWithUTF8String:convert]; NSMutableArray *sample = [responseString JSONValue]; return sample; } </code></pre> <p>and putting them into:</p> <pre><code>NSMutableArray *qnBlock1 = [self qBlock]; NSString *answer1 = [NSString stringWithFormat:[[qnBlock1 objectAtIndex:0]objectAtIndex:1]]; answer = [[NSMutableDictionary alloc]init]; [answer setObject:answer1 forKey:@"1"]; question1.text = [[qnBlock1 objectAtIndex:0] objectAtIndex:0]; label1a.text = [[qnBlock1 objectAtIndex:0]objectAtIndex:2]; label1b.text = [[qnBlock1 objectAtIndex:0]objectAtIndex:3]; label1c.text = [[qnBlock1 objectAtIndex:0]objectAtIndex:4]; label1d.text = [[qnBlock1 objectAtIndex:0]objectAtIndex:5]; </code></pre> <p>I received this error during runtime</p> <pre><code>-[__NSCFDictionary objectAtIndex:]: unrecognized selector sent to instance 0x6c179502012-04-30 09:43:50.794 AppName[371:f803] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary objectAtIndex:]: unrecognized selector sent to instance 0x6c17950' </code></pre> <p>Is this due to syntax issue for 2 dimensional array?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload