Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Use Bindings.</p> <p>Note that you <em>must</em> follow the MVC pattern to get the most from bindings. <strong>This is easier than it seems</strong>, as Cocoa does almost everything for you nowadays:</p> <ol> <li>View: <code>NSView</code> and subclasses (of course), <code>NSCell</code> and subclasses, <code>NSWindow</code> and subclasses</li> <li>Controller: <code>NSController</code> and subclasses (especially <code>NSArrayController</code>)</li> <li>Model: Core Data</li> </ol> <p>If you're not going to use Core Data, then you get to roll your own model objects, but this is easy. Most of these objects' methods will be simple accessors, which you can just <code>@synthesize</code> if you're targeting Leopard.</p> <p>You usually can't get away with not writing any code, but Bindings can enable you to write very little code.</p> <p>Recommended reading:</p> <ul> <li><a href="http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueCoding/" rel="noreferrer">Key-Value Coding (KVC) Programming Guide</a></li> <li><a href="http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueObserving/KeyValueObserving.html" rel="noreferrer">Key-Value Observing (KVO) Programming Guide</a></li> <li><a href="http://developer.apple.com/documentation/Cocoa/Conceptual/ModelObjects/" rel="noreferrer">Model Object Implementation Guide</a></li> <li><a href="http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueCoding/Concepts/AccessorConventions.html" rel="noreferrer">KVC Accessor Methods</a> (part of the aforementioned KVC Programming Guide) and <a href="http://boredzo.org/blog/archives/2007-08-07/a-complete-raw-list-of-kvc-accessor-selector-formats" rel="noreferrer">my complete list of KVC-compliant accessor selector formats</a></li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload