Re: Controllers and Views
Re: Controllers and Views
- Subject: Re: Controllers and Views
- From: mmalcolm crawford <email@hidden>
- Date: Thu, 15 Jul 2004 18:20:58 -0700
On Jul 15, 2004, at 5:35 PM, Tim Conkling wrote:
The magical part that I can't quite wrap my head around is that, when
the NSArrayController has an object added to or deleted from it, the
NSTableView immediately reflects the changes, though I never made any
binding from NSArrayController to the NSTableView. How does the array
know about the table view? Do bindings somehow work both ways
automatically?
Bi-directional synchronisation is the main feature of Cocoa bindings.
The array does not, though, know about the table view; the array
controller is responsible for manipulating the array using key-value
coding (typically via suitable accessor methods implemented by the
object that contains the array). See:
<
http://developer.apple.com/documentation/Cocoa/Conceptual/
CocoaBindings/Concepts/WhatAreBindings.html>
and
<
http://developer.apple.com/documentation/Cocoa/Conceptual/
CocoaBindings/Concepts/HowDoBindingsWork.html>
mmalc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.