Hacker News new | ask | show | jobs
by icodestuff 4497 days ago
Looks like it's implemented similarly to MAKVONotificationCenter, except that it doesn't support observation on arrays/array indexes. And why does it need to manually call the shared controller's -observeVFK... when the Initial option is set? That should be called automatically by the KVO machinery. It's a bit concerning.

Also it seems like keeping track of the additional controller objects would be a PITA.

1 comments

KVOController 1.0.0 supports observing arrays and other ordered relationships, just not values within. I filed https://github.com/facebook/KVOController/issues/5 to track. Features requests are welcome.

Performing the initial callback manually, avoiding the KVO initiated one, was shown to be a performance improvement under certain KVO configurations.

We've updated the readme to include an example tracking the controller object. An instance variable should all that is necessary: https://github.com/facebook/KVOController.

> Performing the initial callback manually, avoiding the KVO initiated one, was shown to be a performance improvement under certain KVO configurations.

Please elaborate. I've been re-implementing KVO, and have not seen this. What configurations?

Also, adding a controller ivar/property is rather invasive, don't you think?