• 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: The KVO Race
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The KVO Race


  • Subject: Re: The KVO Race
  • From: Keith Duncan <email@hidden>
  • Date: Tue, 03 Jun 2008 21:46:36 +0100

I have traced the problem to KVO race conditions.

In most cases these can be solved by setting up the key dependencies and occasionally by using the NSKeyValueObservingOptionInitial (Leopard only) option.


From your summary, I'm assuming that the editLayer property is dependent on the NSIndexPath that you're also observing.

So, if you're targeting 10.4 you can use the +setKeys:triggerChangeNotificationsForDependentKey: method in your controller's +initialize method to set the dependencies. This method is deprecated in Leopard in favor of the +keyPathsForValuesAffectingValueForKey: method. Look them up in the documentation for how to use them.

Keith
_______________________________________________

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


  • Follow-Ups:
    • Re: The KVO Race
      • From: Gordon Apple <email@hidden>
References: 
 >The KVO Race (From: Gordon Apple <email@hidden>)

  • Prev by Date: Core Data merge and "statement is still active" error?
  • Next by Date: Re: NSTextView programmatically apply smart quotes?
  • Previous by thread: Re: The KVO Race
  • Next by thread: Re: The KVO Race
  • Index(es):
    • Date
    • Thread