Re: docs, KVO and NSUserDefaults etc.
Re: docs, KVO and NSUserDefaults etc.
- Subject: Re: docs, KVO and NSUserDefaults etc.
- From: "email@hidden" <email@hidden>
- Date: Mon, 21 Jun 2010 20:32:22 +0100
On 21 Jun 2010, at 18:28, Matt Neuburg wrote:
> On the one hand, Apple seems to warn in some documents that one should not
> assume KVO-compliance unless explicitly asserted. On the other, KVO is far
> more widely implemented in the built-in classes than is explicitly asserted.
> Experimentation shows that NSUserDefaults is KVO-compliant, and so are lots
> of properties of other objects.
>
NSUserDefaultsController provides the recommended KVO compliant interface to NSUserDefaults.
I suppose the argument here is that KVO compliance for attribute and to-one relationships
seems 'almost' inevitable - make the code KVC compliant + allow automatic notifications.
So if it's nearly inevitable why not take advantage of it!
It's a different story though for to-many relationship compliance.
However, if it's documented as KVO compliant and it breaks you can come here and complain.
If it is not so documented and it breaks then you have to make do with shouting at the cat.
Regards
Jonathan Mitchell
Developer
Mugginsoft LLP
http://www.mugginsoft.com
_______________________________________________
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