You did not answer my first question, which was not an idle question. I'll answer here, but if cross-chatter appears in a different thread I'll ignore it. You'll have to keep track of the mess yourself.
Apple_For_The_Win wrote:
At this point, I've dragged a Table View onto my window, in Xcode. I've connected it to the value "myTableView", and that's where I need help. I'm specifically trying to add cells into the table view.
I'll assume that 'connected it to the value "myTableView"' means that you've control-dragged in XCode from the table view in Main Menu.xib to a property in your applescript app delegate called myTableView. If that's not the case, please correct me.
I prefer to use an array controller for this, so please drag an array controller object into main menu.nib. once you've done that, do the following:
- open the applescript app delegate and add a new property called "tableController"
- select the table view in the object list (you may need to open some disclosure triangles to reach it). and add appropriate (an) column name(s). you can hide column titles later if you like, but having named columns makes life easier.
- select the array controller in the object list
- rename the array controller "table data"
- open the attributes inspector, and then add the column name(s) as key(s) in the object controller area
- open the bindings inspector, and where it says "controller content", open the disclosure arrow and bind the content to the App Delegate object on the model key path self.tableController
- select the table view in the object list again, then go down a level and select each column in turn
for each column, open the bindings inspector, and where it says "value", open the disclosure arrow and bind the content to the Table Data object with the controller key arrangedObjects model key path being the name of the column (which is the name of the key in the controller as well)
- back in the applescript app delegate, add code like the following:
-- create a list of records, where each record represents a row and the column name is the record key
set myData to {{column_1_name:"hello"}}
-- convert it to an NSArray and add it to the controller content. don't forget the *my* keyword, or it won't work
set my tableController to NSArray's arrayWithArray:myData
-- may or may not be needed
myTableView's reloadData()
That should populate the table with simple text. if you want something more complicated (like buttons or links) then create the more complicated elements separately and add them to the data.