Re: observeValueForKeyPath called twice when changing NSUserDefaults value

2016-11-13 Thread Quincey Morris
On Nov 13, 2016, at 14:44 , Steve Mills wrote: > > NSUserDefaults can be observed using Key-Value Observing for any key stored > in it. OK, it’s documented in the header file. > Suggesting that the old/new values in the change dict shouldn't be used is > kinda silly. Why

Re: observeValueForKeyPath called twice when changing NSUserDefaults value

2016-11-13 Thread Steve Mills
On Nov 13, 2016, at 15:24:44, Quincey Morris wrote: > > Is this a new thread, or a continuation of the one we had a couple of weeks > ago (IIRC)? Brand new thread. I didn't see anything before. > NSUserDefaults is not documented as KVO compliant for any

Re: observeValueForKeyPath called twice when changing NSUserDefaults value

2016-11-13 Thread Quincey Morris
On Nov 13, 2016, at 13:00 , Steve Mills wrote: > > I've added an observer for an NSUserDefaults keyPath. Is this a new thread, or a continuation of the one we had a couple of weeks ago (IIRC)? NSUserDefaults is not documented as KVO compliant for any of its properties. You

observeValueForKeyPath called twice when changing NSUserDefaults value

2016-11-13 Thread Steve Mills
I've added an observer for an NSUserDefaults keyPath. This causes observeValueForKeyPath: to be called twice. Here's the call stack for the first call, starting from the setObject call (I'm actually calling setBool): #0 0x00017130 in -[AppDelegate