This works OK, except for the case of a mouseclick inside the app
window but
not inside one of the graph views. In this case the selected views
should be
deselected, but how do I know when the mouseclick happens? It happens
outside the graph views so it should be handled outside of the
graphview
code, right?
Why not forward the event along to your graph views, converting
coordinates as necessary?
I think a cleaner solution would be to just embed all the views in a
"background view" that implements mouseDown: and on a click loops
over its subviews, telling them to unselect.