From: Dave H. <gr...@gr...> - 2005-09-10 07:54:47
|
I'm doing a little program that has an outline view and a table view, and my Ruby code is being the datasource for both. The table view is to show details of whichever item is selected in the outline view. The outline view gets updated, in part with def outlineView_isItemExpandable(outlineTable, item) blah blah blah end In this case, "item" contains the Ruby object that's represented on that line of the outline view. Cool. I'm assuming that comes from the fact that my def outlineView_child_ofItem(outlineTable, child, item) is returning a Ruby object when called by the outline view. However, for the table view, I need to figure out what object is currently the selected object. So I'm doing this: def tableView_objectValueForTableColumn_row(table, tableColumn, row) currentRow = @myOutlineView.selectedRow selectedItem = @myOutlineView.itemAtRow(currentRow) blah blah end In this case, "selectedItem" contains <OSX::OCObject:0x142014 class='<RBObject: 0xa6234>' id=0x5737140>. It isn't unwrapping my RBObject from the OCObject. How do I get my Ruby object back? |