I have an NSXMLNode containing a series of child node and I would like to show the attribute of those child nodes in an NSTableView using NSArrayController and bindings.
I'm new to NSArrayControllers and bindings so I decided to start by populating the table with just the children of the node. It is very similar to Apple's example "XMLBrowser" although I can manage to get mine working.
My view controller has a property holding the NSXMLNode which is populated in the initWithNibName method. From here the steps I followed are:
Add an NSArrayController to the xib file
Set its class name to NSXMLNode and add "name" to the keys
Bind it to the file owner (the ViewController) and add ".children" to the Model-Key-Path
I bind my table column to the Array Controller.
Set the Controller Key to "arrangedObjects" and the Model-Key-Path to "name"
I checked through breakpoints and NSLog that my NSXMLNode has meaningful children but despite that the TableView doesn't get populated.
Do you see any flaw with my steps? Is there anything I'm missing?
Also how do you debug these apps? There is very little code to place breakpoints and NSLogs, how can I know what's going on?