On Nov 5, 2010, at 15:13, Ayers, Joseph wrote: > I have a core data model that has a series of to-many relationships of the > type: > > @interface TapeList : NSManagedObject > { > NSString * ListURL; > NSSet* tapes; > } > > @interface tapes : NSManagedObject > { > NSString * Notes; > NSString * TapeName; > NSSet * VideoClip; > } > > @interface VideoClip : NSManagedObject > { > NSString * StartTimeCode; > QTMovie * mMovie; > NSString * EndTimeCode; > NSString * Notes; > NSString * movieURL; > tapes * CurrentTape; > NSSet* Table; > } > > @interface Table : NSManagedObject > { > NSString * Notes; > NSString * Name; > NSSet* CommandStates; > NSSet* Flexions; > NSSet* DataSources; > } > > A reference to tapeList.tapes works fine, but a reference to > tapeList.tapes.VideoClip gives me a > "request for member "VideoClip in something not a structure or union" compile > time error.
I think you've got something wrong here, but there are 2 possibilities for what it is. Choose A or B, if either applies. :) A. With your declarations, 'tapeList.tapes' is a NSSet. The set doesn't have a "VideoClio" property (though its members do), and the compiler is correctly telling you that you can't refer to such a property. *Which* 'tapes' object are you trying to refer to? B. This is not how you use properties in Core Data -- you do NOT declare instance variables corresponding to the properties in your data model. Instead, those properties are defined for you by Core Data. You *do* have to supply property declarations to keep the compiler happy (as described in the Core Data documentation). _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com