On Nov 6, 2010, at 06:54, Ayers, Joseph wrote:
> On Nov 5, 2010, at 7:52 PM, Quincey Morris wrote:
>
>> 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?
>
> That is indeed the problem. VideoClip is a relationship of tapes. How should
> this be addressed?
Well, it depends what you're trying to do. You mentioned a reference to
'tapeList.tapes.VideoClip'. What's the context of that reference, and what
object or objects are you trying to use there?
>>
>> 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).
>>
>
> The manual says that you have to declare the properties to maintain 32bit
> compatability.
There's nothing in the documentation that says you need to declare *instance
variables*. Using NSManagedObject subclasses is described here:
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CoreData/Articles/cdManagedObjects.html%23//apple_ref/doc/uid/TP40003397-258615
There are no instance variables in this pattern. (Note that there are custom
property scenarios where extra instance variables are needed, but that's not
the scenario you have.)
_______________________________________________
Cocoa-dev mailing list ([email protected])
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 [email protected]