Bob Ippolito wrote:
> On Jul 14, 2005, at 8:24 AM, Michael Glassford wrote:
>> I have a PyObjC application that contains both an NSOutlineView and
>> an NSTableView. I have defined both
>> outlineView_shouldEditTableColumn_item_() and
>> tableView_shouldEditTableColumn_row_() in the appropriate delegates.
>> When I double-click on an item in either of the controls, the
>> appropriate shouldEdit function is called and simply returns True in
>> both cases.
>> The problem is that, while this works in the NSTableView, it doesn't
>> work in the NSOutlineView: in the outline view, the cell never enters
>> edit mode.
>> Does anyone know why this might be? A PyObjC bug? An Interface
>> Builder setting I've failed to check? A misunderstanding on my part?
> Could be anything, perhaps you should post some runnable code so that
> someone can look into it without writing an application from scratch.
I tried to do this, and in the process figured out the problem. It was
that I was replacing the default cell type with an NSBrowserCell in the
code (using NSTableColumn.setDataCell_()) and wasn't copying the value
of the editable attribute to the new cell. The result was that,
although the table itself was editable, the individual cells were not.