Re: master-detail: binding array controller to the attribute of selection of master array controller
Re: master-detail: binding array controller to the attribute of selection of master array controller
- Subject: Re: master-detail: binding array controller to the attribute of selection of master array controller
- From: mmalc crawford <email@hidden>
- Date: Wed, 23 Jul 2008 14:42:41 -0700
On Jul 23, 2008, at 11:51 AM, Izidor Jerebic wrote:
Hm, the docs say:
Typically, the content binding is created automatically when the
initial NSTableColumn binding is made, binding to the column's
NSArrayController.
I don't see what is inappropriate.
It should work, because I set it to the same array controller that
the bindings machinery would set it anyway, right?
No, you didn't. You only set the 'content' binding'.
And binding machinery would override it anyway, right?
Wrong.
It says nothing about "do not set this binding because selection
notifications won't work". It says that it is read-only, but why is
there any effect when setting it in InterfaceBuilder? And why am I
allowed to set it? What does it mean 'read-only' ?
You are allowed to set it. If you set it, though, you also have to
set the 'sortDescriptors' and 'selectionIndexes' bindings as well -- <http://homepage.mac.com/mmalc/CocoaExamples/controllers.html
> per original message.
I was asking whether there are any help mechanisms for bindings that
I am unaware of. Only documentation and advice "don't make mistakes"
is not enough, imho. There's too much magic...
It's no more magic than any other aspect of the key-value technologies
in this regard.
If you make a change to a nib file, then if something doesn't work as
a result that's your fault.
Interface Builder can no more determine whether you've provided
incorrect values for a binding than the compiler can determine whether
you've provided a valid string for valueForKey:.
If you make a change to a nib file, it's your responsibility to
account for that change. If you make a mistake, you should be able to
go back to your version control system to get back the last working
version...
mmalc
_______________________________________________
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