我有我的生成的模型對象一噸的錯誤:Xcode中產生的NSManagedObject子類錯誤
ExerciseSet.h上線
1 @class Exercise;
2
3 @interface ExerciseSet : NSManagedObject
4
5 @property (nonatomic, retain) NSNumber * order;
6 @property (nonatomic, retain) NSNumber * reps;
7 @property (nonatomic, retain) NSNumber * weight;
8 @property (nonatomic, retain) Exercise *belongsTo;
9
10 @end
Illegal interface qualifier
1.- 第3行
Expected identifier or '('
在線8 Property with 'retain (or strong)' attribute must be of object type
上線8- 警告所有屬性不調用
@synthesize
,或@dynamic
(這當然被稱爲)
Exercise.h
1 @class ExerciseName, ExerciseSet, Workout, WorkoutMethod;
2
3 @interface Exercise : NSManagedObject
4
5 @property (nonatomic, retain) NSString * notes;
6 @property (nonatomic, retain) NSDecimalNumber * restBetweenSets;
7 @property (nonatomic, retain) NSNumber * rmMethod;
8 @property (nonatomic, retain) NSDecimalNumber * rmResult;
9 @property (nonatomic, retain) Workout *belongsTo;
10 @property (nonatomic, retain) NSSet *hasSet;
11 @property (nonatomic, retain) WorkoutMethod *isDoneWith;
12 @property (nonatomic, retain) ExerciseName *takesNameFrom;
13 @end
14
15 @interface Exercise (CoreDataGeneratedAccessors)
16
17 - (void)addHasSetObject:(ExerciseSet *)value;
18 - (void)removeHasSetObject:(ExerciseSet *)value;
19 - (void)addHasSet:(NSSet *)values;
20 - (void)removeHasSet:(NSSet *)values;
21 @end
Illegal interface qualifier
第1行Missing @end
上面的第3行。Unknown type name 'Workout'
第9行。- 等
對方前鋒聲明的接口都OK,沒有問題或錯誤。
什麼可能導致此行爲?
已編輯的問題。 – Gerstmann 2012-03-06 08:06:36
嘗試刪除;在類 – 2012-03-06 08:11:19
沒有工作,給出了預期的語法錯誤。 – Gerstmann 2012-03-06 08:14:46