On Sep 6, 2009, at 10:00 AM, Steven Degutis wrote:
For instance, if you have 2 genuine properties on your "Person"
entity called firstName and lastName then you can create a fullName
property
on your Person class, and when firstName or lastName change, call
-willChangeValueForKey: and -didChangeValueForKey: on "fullName" and
then
have your -fullName method return a concatenation of the first and
last
names.
This is at best misleading.
In this situation, you should typically not invoke the change
notification methods yourself; instead, you should set up dependent
keys as described in <http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/KeyValueObserving/Concepts/DependentKeys.html#//apple_ref/doc/uid/20002179-BAJEAIEE
>
mmalc
_______________________________________________
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]