Errors trying to build project


#1

Hi, while working my way through the book this is the first time I’ve encountered build errors I couldn’t fix myself.

I’m getting an error in ItemsViewController for the code shown below.

    // Convert time interval to NSDate.
    [[cell thumbnailView] setImage:[p thumbnail]];

The error is “No visible @interface for ‘BNRItem’ declares the selector ‘thumbnail’.” I’m getting a similar error in DetailViewController for the selector ‘setThumbnailDataFromImage’.

Here is my BNRItem.h file:

#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>


@interface BNRItem : NSManagedObject

@property (nonatomic, retain) NSString * itemName;
@property (nonatomic, retain) NSString * serialNumber;
@property (nonatomic) int32_t valueInDollars;
@property (nonatomic) NSTimeInterval dateCreated;
@property (nonatomic, retain) NSString * imageKey;
@property (nonatomic, retain) NSData * thumbnailData;
@property (nonatomic, strong) UIImage *thumbnail;
@property (nonatomic) double orderingValue;
@property (nonatomic, retain) NSManagedObject *assetType;

- (void)setThumbnailDataFromImage:(UIImage *)image;

@end

I’ve loaded the solution file. It builds without a problem. Side by side, the two projects look identical.

Naturally, it’ll be something stupidly obvious. But right now it’s making me pull my hair out. Thanks for any help!
Richard


#2

I was looking for a case error, but you haven’t shown the method invocation and implementation for the declaration:
- (void)setThumbnailDataFromImage:(UIImage *)image;

Make sure that you don’t have any case errors in the method names, most common causes of errors in Objective-C.


#3

Thanks for the response. I think I’m onto the problem. Somehow I got my folders and files seriously mangled, possibly during a snapshot restoration. I’ll work on straightening it out and report back later


#4

Ha! That didn’t take long. Homepwner compiles without error now. Ibex10, thanks for helping.