views:

52

answers:

1

I have a fairly pedestrian non-editable NSOutlineView setup. In the bindings for the outline view, I have set the Double Click Target binding to my file's owner (MyDocument FWIW) with a selector of outlineViewWasDoubleClicked

The method exists and is called, but when I call -clickedRow it consistently returns -1 rather than the row number of the row that I double clicked to trigger the method.

My _outlineView is an IBOutlet and I've verified that it is hooked up correctly by using -selectedRow for the method rather than -clickedRow (I would rather use -clickedRow though because it seems unintuitive for the user to have a row selected, double click another row to do something with it and have the method triggered with the row they had selected.)

My best guess right now is that the -clickedRow value is getting cleared out before my method fires, but I don't know where or what might be gobbling it up.

Thanks in advance for any help.

A: 

Sounds like a bug to me. I suggest filing it and, in the meantime, setting the view's target and double-click action in code.

Peter Hosey
You're right. When I `setTarget:` and `setDoubleAction:` in code, it works a treat.
jxpx777