Database Reference
In-Depth Information
on page 127 . Let's walk through the steps to set it up. For a more detailed
review of this process, take a look at Chapter 8, OS X: Bindings, KVC, and
KVO , on page 137 .
Figure 22—The main window
Building the Recipe Source List
The first part of the interface we are building is in the upper-left corner, just
below the search field. This view is an NSTableView configured with one column.
It has no horizontal scroll bar, but it does have an automatically displaying
vertical scroll bar. In addition, it has a hidden header and the highlight set
to Source List. The scroll bars are configured in the inspector for the NSScrol-
lView . The number of columns and the highlight option are configured in the
NSTableView inspector. Each of the inspectors can be accessed by Control+Shift-
clicking (or Shift+right-clicking) the NSTableView and selecting the appropriate
view from the list. If the inspector is not on the screen, it can be displayed
via the Tools > Inspector menu item.
To bind this table to our recipe's NSArrayController object, though, we need to
dig down a little bit and get a hold of the NSTableColumn so we can tell that col-
umn what to display. We could click in the table view until eventually we
select the NSTableColumn , but fortunately there is an easier way. As mentioned,
if we Shift+right-click the table, we are presented with a pop-up listing of all
of the views; we can then select the NSTableColumn (see Figure 23, List view tree ,
 
 
 
Search WWH ::




Custom Search