Re: docs, KVO and NSUserDefaults etc.
Re: docs, KVO and NSUserDefaults etc.
- Subject: Re: docs, KVO and NSUserDefaults etc.
- From: Ken Thomases <email@hidden>
- Date: Mon, 21 Jun 2010 14:00:54 -0500
On Jun 21, 2010, at 12:28 PM, 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.
Those two statements are not in conflict. Some classes may be KVO compliant incidentally to their implementation, but such compliance is not part of the interface contract, and so may change as they change the implementation. (One of the main purposes for limited interface promises is to allow the implementers freedom to change the implementation.)
> But how is the user supposed to know this? Or is the user who discovers this
> supposed to ignore it?
You're supposed to ignore it. The warnings you cite constitute instruction from Apple to ignore it. What else did you think they meant?
This is no different from probing with various means any other implementation detail of framework classes. It might be interesting, but you shouldn't rely on what you find not changing in the future (or even in the present on a different machine, or a different boot of the current machine, or whatever).
Regards,
Ken
_______________________________________________
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