Question

I have added a NSPathControl to a View in my application. In awakeFromNib I sets the double-click action:-

[currentPath setDoubleAction:@selector(dClickPath:)];

Unfortunately, double-click on the PathControl does not work, although I had first tested this a simple stand alone test application.

I suspect that there may be some interaction with other elements. In particular I have a NSSplitView which contains a NSOutlineView and a NSTableView, both of which have Double Click Target bindings to separate selectors in the controller.

I don't see why these should affect the NSPathControl.

If I connect the NSPathControl selector to dClickPath: then Click on the PathControl works.

Was it helpful?

Solution

Are you setting the target? When you connect a control in IB, that sets the target and the action. If you don't do that in IB, then setting the double-click action in code is not enough. You also have to set the target.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top