So in my app users can select a larger block of connected elements with a triple-click, just like selecting a paragraph works in an NSTextView.
However, a small subset of these elements also has properties that can be edited and a double-click switches to edit mode for these elements..
This leads to the current, unfortunate behaviour:
- If a user triple-clicks a non-editable element the entire block of elements is highlighted, no problem.
- If a user triple-clicks editable elements an edit is triggered and the third click is ignored.
What would be the best approach to enable triple-click on editable elements, i.e. something like waiting whether a third mouse click follows and enabling edit mode only then..?
Some dispatch after mechanism with a delay of NSEvent.doubleClickInterval
maybe?
Any suggestions on how to implement this in a robust manner would be much appreciated!
Cheers,
Jay