From: Alex S. <al...@al...> - 2007-08-04 17:42:03
|
Hi there, I'm having some problems setting up bindings programmatically. I'm trying to use a table with a (-) button in that removes it's row when clicked. The other table columns are bound to an ActiveRecordSetController, and the button column is unbound (is this right?). I then use setDataCell on the this column. This is what I've tried: cell = OSX::NSButtonCell.alloc.init cell.objc_send( :bind, "target", :toObject, self, :withKeyPath, "current_sale_controller", :options, {"NSSelectorName" => "remove" } ) cell.setTitle '-' @remove_button_column.setDataCell cell This doesn't give an error, but nothing happens when you click the button. I think it could possibly be a problem with OSX::NSSelectorName not being a recognized constant, which is why I used the string instead. Am I on the right track here? Any pointers appreciated, I've searched google (a lot) before asking and I'm out of ideas... Thanks in Advance, Alex Speller |