title: How can I write cocoa bindings as code instead of in the Interface Builder?
body: <p>In my model I got an <code>NSMutableArray</code> that keeps track of a changing number of elements.
  In my view I got a <code>NSTextField</code> that shows the number of elements.<br>
  The view gets unarchived from the nib file and alloc/inits the modell. Therefore, it knows about the modell and the contained array.</p>
  
  <p>I established the connection as follows. In the <em>Interface Builder</em> at the textfield I added a <em>Cocoa Binding</em> "path" like this: <code>myModell.myArray.@count</code>. By this I can access the <code>count</code> property (which is a must since the array itself does <strong>not</strong> change).<br>
  The binding is based on key-value compliance, which I established at the model so the array can be accessed. But key-value compliance is not part of the questions.</p>
  
  <p><strong>My question:</strong> How can I put the binding into the source code and not writing it into <em>Interface Builder</em>?</p>