Cocoa Core data: cannot save Created Items in NSTableview
- by Paul Rostorp
Hello, I'm am a beginner in mac os x development and am trying to get started with all this.
Here is my problem : I've create a non-document based cocoa app using core data as storage. I've added an entity and attributes to the xdatamodel. In IB i've created an NSArrayController and linked it properly. I've created an nstableview binded to the nsarraycontroller. Next I added a button linked to nsarraycontroller with the " add: " method.
When I try it out, I can add and edit the items in the table.
Here comes the problem: Core data is supposed to save everything automatically, but to make sure i linked the "save" button in the menu to the appdelegate and to the " file's owner" , first responder, application... everything possible ( with both " save :" and " saveaction:" methods ).
And still it doesn't save when clicking save: when I restart the cell created ( and renamed ) are gone.
And also, I didn't even edit the source code yet; core data for such simple tasks is supposed to only need Interface builder.
Please help me for this, I haven't found any threads resolving this problem.
Thank you in advance.