• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSArrayController design/usage question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArrayController design/usage question


  • Subject: Re: NSArrayController design/usage question
  • From: mmalc Crawford <email@hidden>
  • Date: Tue, 08 Sep 2009 00:04:41 -0700


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@hidden)

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:
This email sent to email@hidden


References: 
 >NSArrayController design/usage question (From: Gregory Holden <email@hidden>)
 >Re: NSArrayController design/usage question (From: Steven Degutis <email@hidden>)

  • Prev by Date: Re: Problem with LSSharedFileListInsertItemURL() usage. (API in LaunchServices/LSSharedFileList.h)
  • Next by Date: email@hidden
  • Previous by thread: Re: NSArrayController design/usage question
  • Next by thread: Re: NSArrayController design/usage question
  • Index(es):
    • Date
    • Thread