Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Your error is telling you that you're trying to use dictionary subscripting syntax of <code>dictionary[key]</code> (which, when you use that syntax, calls the <a href="https://developer.apple.com/library/ios/documentation/cocoa/reference/foundation/Classes/NSDictionary_Class/Reference/Reference.html#//apple_ref/occ/instm/NSDictionary/objectForKeyedSubscript%3a" rel="nofollow"><code>objectForKeyedSubscript</code></a> method) on something that is not a dictionary, but actually is an array. You should do two things:</p> <ol> <li><p>First, confirm precisely which line of code is causing the problem. I'm assuming, on the basis of the code you chose to share with us, that you suspect it is from that code in your <code>for</code> loop, in which you're retrieving the the <code>coordinate</code>, <code>title</code>, etc.</p> <p>But you really should confirm that this code is causing the problem (and not something else in your code). You can do that with an <a href="https://developer.apple.com/library/mac/recipes/xcode_help-breakpoint_navigator/articles/adding_an_exception_breakpoint.html" rel="nofollow">exception breakpoint</a>, or by single stepping through this routine.</p> <p>You should examine (either in the debugger or by inserting a <code>NSLog</code> statement), the contents of the <code>dictionary</code> object. Your error suggests that it is actually an array, and not a dictionary.</p></li> <li><p>Once you've confirmed which line of code is causing the problem, you then need to step back and identify how the object point ended up as an array rather than as a dictionary. It could be either (a) how this method was called (e.g. wrong parameter passed); or (b) how the original array of dictionaries was created.</p></li> </ol>
    singulars
    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