objective c - NSCF Array Out of Bounds? -


i have simple application using core data, , couple array controllers (in ib, no code files them, other xcdatamodel file). when run application, following error in log (the app still runs, no window appears until go file > new document):

2011-02-08 18:45:10.434 myapp[35178:a0f] *** -[nscfarray objectatindex:]: index (0) beyond bounds (0)

i have no references in mydocument.h or .m files array. error not critical (the app still runs), disables of code load last used document or (if doesn't exist) load fresh document. app loads no visible windows. greatly appreciate on , award answer :)

edit: here applicationshouldopenuntitledfile code:

- (bool)applicationshouldopenuntitledfile:(nsapplication *)sender {     nsarray* urls = [[nsdocumentcontroller shareddocumentcontroller] recentdocumenturls];     if ([urls count] > 0){         nsurl *lasturl= [urls objectatindex: 0];          [[nsdocumentcontroller shareddocumentcontroller] opendocumentwithcontentsofurl:lasturl display:yes error:nil];             return no;      }      return yes; } 

sorry post here, don't have right comment everywhere moment.

@zakman411: justin saying should enable "stop on objective-c exceptions" item in run menu, launch debugger. gdb should show exception thrown exactly.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -