Forward declaration?


#1

just before the section “adding BNRAssetTypes to homepwner” it asks you to build and run…

i get an entire sea of red !'s all saying:

[quote]ARC Issue
Receiver type ‘BNRItem’ for instance message is a forward declaration[/quote]

there’s also one:

[quote]Semantic Issue
Incompatible pointer types sending ‘BNRItem *__strong’ to parameter of type ‘NSManagedObject *’[/quote]

so it seems to me that i messed up some the #imports somewhere, but all of mine seem to match the ones in the solution files.


#2

Hm. Try adding a #import “BNRItem.h” to the .m file with all of the errors.


#3

it’s already there… and actually when i started troubleshooting myself i started adding BNRItem.h to the top off all of the files
the errors are happening in ItemsViewController.m and BNRItemStore.m… and now that i play around a bit more… it’s not always throwing the same sets of errors… sometimes DetailViewController.m is in the mix, and sometimes BNRItemStore.m isn’t…
i’m going to chalk it up to ghosts and move forward with the solution at that point.
really enjoying the book BTW


#4

Last time I had a similar message (I wasn’t using Core Data), I was using Core Animation, and I forgot to do the obvious, which was link the Core Animation framework and import it ( i.e. #import ). At the risk of asking the obvious, but… did you import Core Data?


#5

i actually moved on to the next chapters and trashed the project i was working on… in favor of the saved copy in the solutions file.

but i do remember importing core date… i forget which file(but i’m pretty sure it’s whichever one the book said) but i do remember that it wasn’t auto completing “CoreData/CoreData.h” when i typed it in