4

Trying to wrap my head around cocoa bindings can't determine the reason for this error

I Have a simple app, in which, the app delegate passes the Managedobjectcontext to Window Controller, which passes it to a view controller. The nib associated with view is a viewbased table with array controller.

I initiated a few managed objects in the app delegate, when I run the application the table is populated with the objects however the following error is thrown

[_NSControllerArrayProxy firstIndex]: unrecognized selector sent to instance 0x100165510

Since there is very little code, not sure how to debug this

Cory
  • 2,302
  • 20
  • 33
  • This is one of the de-merit of binding. :( – Anoop Vaidya Apr 13 '13 at 14:25
  • [First](http://stackoverflow.com/questions/760277/how-to-add-an-object-to-a-programatically-bound-nsmutablearray). And [Second](http://forums.bignerdranch.com/viewtopic.php?f=183&t=5511). [Full google list](https://www.google.co.in/search?q=%5B_NSControllerArrayProxy+firstIndex%5D%3A+unrecognized+selector+sent+to+instance&rlz=1C1ZMDB_enIN505IN505&aq=f&oq=%5B_NSControllerArrayProxy+firstIndex%5D%3A+unrecognized+selector+sent+to+instance&aqs=chrome.0.57.233j0&sourceid=chrome&ie=UTF-8) – Anoop Vaidya Apr 13 '13 at 14:29
  • shuld post as an answer...it will help others too – Anoop Vaidya Apr 13 '13 at 15:08

1 Answers1

8

Thanks Anoop, your second link solved my problem I had the controller key for Selection indexes set to arrangedObjects, I changed this to selectionIndexes and all is working.

Cory
  • 2,302
  • 20
  • 33