Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Controllers and Views
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Controllers and Views



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.


References: 
 >Controllers and Views (From: Tim Conkling <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.