Hi

Suppose I want to make a controller, which allows a view to bind to the keyPath:

mainBranch.subBranch.attribute

There will be a large range of theoretical subBranch.attribute
combinations, but only a few of these will actually be bound to by the
user. Other combinations will therefore be uninteresting. The
attributes will be read-only and mostly static, values like
minValue/maxValue or isEditable. No actual control values. Suppose it
is much easier for me to have my controller produce these attributes
on-the-fly, in valueForKeyPath:, than to produce a tree structure to
hold all the information. The attributes will rarely change (typically
once per session), and when they do, the entire mainBranch will be
switched out.

My question is: Must I ensure KVC-compliance for every subpath of the
key path? So that querying the controller for mainBranch.subBranch
MUST return a KVC-compliant object with all the attributes, and
querying for only mainBranch MUST return an object that can be queried
for subBranch.attribute, or only subBranch etc...? Even if it doesn't
make sense to bind anything to these subpaths?

Per
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to