FROM : Keith Duncan
DATE : Tue Jun 03 22:46:36 2008
> 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
DATE : Tue Jun 03 22:46:36 2008
> 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
| Related mails | Author | Date |
|---|---|---|
| Gordon Apple | Jun 3, 18:53 | |
| Hamish Allan | Jun 3, 19:21 | |
| Gordon Apple | Jun 3, 21:20 | |
| Keith Duncan | Jun 3, 22:46 | |
| Gordon Apple | Jun 3, 23:29 | |
| Hamish Allan | Jun 4, 20:37 |






Cocoa mail archive

