Two ways to add an NSManagedObject (p. 298)


#1

I was briefly stuck on page 298 (2nd ed.) when I tried to add the Possession .h and .m files as subclassess of NSManagedObjects; this is using XCode 4.1.

When following the steps in the book, “…Under Core Data, select the NSManagedObject subclass and hit Next. On the next pane, select the Homepwner data model. One the following pane, select the Possession entity,” I found the last two steps were not possible - I was directed immediately to the Save File dialog.

It happened that when I already had Homepwner.xcdatamodel selected and had the Possession entity selected in the view, then XCode figured that those are the selections that I wanted, and proceeded immediately to create the files.

When I did not have Homepwner.xcdatamodel selected in the Project navigator, then the steps listed in the book worked.


#2

Michael

HUGE thanks for this. I was banging my head against the wall trying to figure out why my xcdatamodel file was all grayed out!!

But good to know that xcode shortcuts this step for us…makes sense now that I know what’s going on.

Thanks

Kenton


#3

Michael,

Thanks a lot for this. Even i was banging my head. I am using XCode 4.0.2 & your approach worked on it as well.

thanks
Sachin