Re: ADC Core Data article
Re: ADC Core Data article
- Subject: Re: ADC Core Data article
- From: mmalcolm crawford <email@hidden>
- Date: Wed, 6 Apr 2005 15:50:30 -0700
On Apr 6, 2005, at 3:25 PM, Timothy Reaves wrote:
I've seen no one comment on what looks to be rather nasty: it
appears that
the only way to use CoreData is to access the values via KVC.
I didn't see anything in the article that makes that assertion?
The article does say, "The NSManagedObject class implements the
functionality needed to fully integrate into the Core Data framework
and can represent any entity. It acts as a dictionary in that any of
its attributes and relationships can be set using Key-Value Coding
(KVC) as well as observed using Key-Value Observing (KVO)."
But it also states (immediately before), "By default, the class used
is NSManagedObject, but the class may be either NSManagedObject or a
subclass thereof."
KVC is a generic technology that allows you to access an object's
properties using the property name as a string. It's can be used
with any object. KVC provides a number of ways the data can be
retrieved. I don't see that the material in the article asserts that
"the *only way* to use CoreData is to access the values via KVC."
Looking at the EOF documentation (purely for historical interest),
EOF provided an EOGenericRecord class that appears to be an analogue
of NSManagedObject. It had private internal storage and could
represent any entity. You accessed properties using key-value
coding. You could also, however, subclass EOGenericRecord and use
explicit instance variables and custom accessor methods if you
wished. You could still access these properties using KVC...
mmalc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden