• 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
Dependent keys - non-cascading?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dependent keys - non-cascading?


  • Subject: Dependent keys - non-cascading?
  • From: Jim Correia <email@hidden>
  • Date: Wed, 2 Nov 2005 13:55:16 -0500

Suppose I have the following in an +initialize for TestObject:

[self setKeys: [NSArray arrayWithObjects: @"firstName", @"lastName", nil] triggerChangeNotificationsForDependentKey: @"fullName"];
[self setKeys: [NSArray arrayWithObject: @"nickName"] triggerChangeNotificationsForDependentKey: @"firstName"];



Setting the value of nickName triggers a change notification for firstName, but that doesn't cascade and also trigger a change notification for fullName.


This is easy enough to work around(*), but I just want to make sure a) that I'm seeing correctly and b) that this is the way it is supposed to be.

(*) OTOH, it also presents the same problems that setKeys: triggerChangeNotificationsForDependentKey: presents by only working for the target class and not subclasses - subclasses have to know more implementation details of their superclass than is strictly necessary or desirable.

Thanks,
Jim
_______________________________________________
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


  • Prev by Date: Re: Subclassing NSSearchFieldCell
  • Next by Date: Re: _NSKeyValueObservationInfoCreateByRemoving crashing
  • Previous by thread: Re: Problems with Attributed Strings and NSTextField
  • Next by thread: fileExistsAtPath:isDirectory - BROKEN?
  • Index(es):
    • Date
    • Thread