コアデータを使用して、IVAR値を初期化するにはどうすればよいですか?ここでコアデータ - メッセージ式のレシーバが初期化されていない値
CDCamera *camForAnnotation;
for(CDCamera *cams in fetchedObjects){
NSSet *annotSet = cams.annotation;
for (CDAnnotations *myannos in annotSet){
if (annotationIdentifer == [myannos objectID]) {
// found camera for annotation
camForAnnotation = cams;
bearing = myannos.bearing;
break;
}
}
}
double aov = [camForAnnotation.aov doubleValue] //Receiver in message expression is an uninitialized value
は私CDCamera .Hです:Analyzerは、ここに
アナライザで問題を投げているオブジェクトを呼び出すためのコードの私のスニペットでエラー「メッセージ式でレシーバが初期化されていない値である」私に与えます:ここでは
#import <CoreData/CoreData.h>
@class CDAnnotations;
@interface CDCamera : NSManagedObject
{
}
@property (nonatomic, retain) NSString * notes;
@property (nonatomic, retain) NSNumber * lfl;
@property (nonatomic, retain) NSNumber * ccd_h;
@property (nonatomic, retain) NSNumber * aov;
@property (nonatomic, retain) NSString * name;
@property (nonatomic, retain) NSNumber * monitor_d_size;
@property (nonatomic, retain) NSSet* annotation;
@end
@interface CDCamera (CoreDataGeneratedAccessors)
- (void)addAnnotationObject:(CDAnnotations *)value;
- (void)removeAnnotationObject:(CDAnnotations *)value;
- (void)addAnnotation:(NSSet *)value;
- (void)removeAnnotation:(NSSet *)value;
- (NSManagedObjectID *) getNSManagedObjectID;
@end
は私.Mは、あなたの時間
#import "CDCamera.h"
#import "CDAnnotations.h"
@implementation CDCamera
@dynamic notes;
@dynamic lfl;
@dynamic ccd_h;
@dynamic aov;
@dynamic name;
@dynamic monitor_d_size;
@dynamic annotation;
- (NSManagedObjectID *) getNSManagedObjectID{
return [self objectID];
}
@end
おかげでエル・P。
ありがとう - 私は見ていきます。 – PhillyNJ