BNRItem @property


#1

Hi All,
After creating the BNRItem as a subclass of the NSManagedObject, my instance properties differ from the ones in the book (pg. 323) slightly. In the book any property listed as strong is listed as retain in my project.

[code]#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
    [/code]
    Any reason this might be? Automatic Reference Counting is “ON.” Should I just change the “retain” to “strong” for each property? From what I understand if I “retain” then I would need to “release” and using “strong” keeps items alive as long as the is reference to it.

#2

YEs, retain and strong are the same thing. They should really update that generator.


#3

also the property orderingValue was not created. i understand that we added it, but it was really hard to get what it was being used for.