Note that there are some explanatory texts on larger screens.

plurals
  1. PO-[__NSArrayM objectAtIndex:]: index 1 beyond bounds [0 .. 0]'
    primarykey
    data
    text
    <p>I have two xml file and I pars them correctly everything is in my log, I want to connect my buttons label to my xml array but I have this error </p> <pre><code> *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** - [__NSArrayM objectAtIndex:]: index 1 beyond bounds [0 .. 0]' *** First throw call stack: (0x1c9b012 0x10d8e7e 0x1c3d0b4 0x30b0 0x101817 0x101882 0x50a25 0x50dbf 0x50f55 0x59f67 0x1dfcc 0x1efab 0x30315 0x3124b 0x22cf8 0x1bf6df9 0x1c1ef3f 0x1c1e96f 0x1c41734 0x1c40f44 0x1c40e1b 0x1e7da 0x2065c 0x26dd 0x2605) libc++abi.dylib: terminate called throwing an exception </code></pre> <p>here is the code:</p> <pre><code>- (void)viewDidLoad { [super viewDidLoad]; appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; pLabel.textColor = [UIColor blackColor]; Presentation *p1 = [appDelegate.presentationArray objectAtIndex:0]; NSLog(@"p1 %@", p1); pLabel.text = p1.pLabel; p2Label.textColor = [UIColor blackColor]; //I have error in this line objectAtIndex:1 Presentation *p2 = [appDelegate.presentationArray objectAtIndex:1]; NSLog(@"p2 %@", p2); p2Label.text = p2.pLabel; [yBtn setTag:0]; [dBtn setTag:1]; } </code></pre> <p>Here is pasring part in appDelega : <a href="http://pastebin.com/SygRZAGj" rel="nofollow">http://pastebin.com/SygRZAGj</a></p> <p>Here is XMLParser Class: <a href="http://pastebin.com/yuFNnFB7" rel="nofollow">http://pastebin.com/yuFNnFB7</a></p> <p>Would you please help me to implement this, how can I have all file in same array , I the problem is because of empty array but how should I and How should I fixed this problem </p> <p>Thanks in advance!</p> <p><strong>Edit:</strong> </p> <p>I want to initialize it only once, and then add eache presentation object one after the other in the same array, How can I do that </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.
    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