Hi,
I have implemented manual sorting per the directions on the post below (thanks!).
http://sensiblecocoa...-model.html#127
However, when I click the add button to add a new record, I get an error because the nsmanagedobject subclass hasn't been initialized properly. Where should I add my code to initialize the nsmanagedobject properly? I am trying to do it in
- (void)tableViewModel:(SCTableViewModel *) tableViewModel itemCreatedForSectionAtIndex:(NSUInteger) index item:(NSObject *) item
but I don't think I have enough information there to properly create the object.
Thanks,
Kevin

Add Button, SCArrayOfObjectsSection and Core Data
Started by
Kevin Tsurutome
, Apr 27 2011 12:00 AM
3 replies to this topic
#1
Posted 27 April 2011 - 12:00 AM
#2
Posted 28 April 2011 - 09:02 PM
Hi Kevin,
You should never need to implement itemCreatedForSectionAtIndex with Core Data, the item should be automatically created for you. Would you please post some of your relevant code and give me more details on the error message you get? Thank you very much!
You should never need to implement itemCreatedForSectionAtIndex with Core Data, the item should be automatically created for you. Would you please post some of your relevant code and give me more details on the error message you get? Thank you very much!
- Joe Glenn, carl grainger, wangxing and 1 other like this
#3
Posted 29 April 2011 - 03:01 AM
Thanks. The problem was I thought that the SCClassDefinition shouldn't have a withManagedObjectContext since I was doing manual sorting. I modified my SCClassDefinition to have a withManagedObjectContext and I can add/edit objects.
But I am still having a problem.
For the manual sorting, is there anything else I need to do besides what is described in the posting I referenced before? It seems like overview list is confused about which row I am editing.
Thanks,
kevin
But I am still having a problem.
For the manual sorting, is there anything else I need to do besides what is described in the posting I referenced before? It seems like overview list is confused about which row I am editing.
Thanks,
kevin
#4
Posted 03 May 2011 - 06:52 PM
Hi Kevin,
I actually need to see some code to answer this (you can email me your project if you wish). Thanks!
I actually need to see some code to answer this (you can email me your project if you wish). Thanks!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users