Re: Figuring out which NSView to send an event to

2012-09-04 Thread Graham Cox
On 04/09/2012, at 11:41 PM, Ken Thomases wrote: > Certainly, you don't expect a click outside of the main or key window, or on > a button when a text field is the first responder, to only go to the first > responder, do you? No, but do you expect to be able to use a tablet to draw into a non

Re: Figuring out which NSView to send an event to

2012-09-04 Thread Ken Thomases
On Sep 4, 2012, at 8:20 AM, Graham Cox wrote: > On 04/09/2012, at 9:28 PM, Akhil Jindal wrote: > >> Using NSWindowList, and iterating over them, I find the window to which the >> event should belong. Now I have to find the NSView within the window. > > Ask the window for its firstResponder. Tha

Re: Figuring out which NSView to send an event to

2012-09-04 Thread Ken Thomases
On Sep 4, 2012, at 6:28 AM, Akhil Jindal wrote: > I’m trying to use the Wacom’s Feel Multi-Touch API to capture touch events > in my app. I have their cintiq hardware connected to my iMac. > Using NSWindowList, and iterating over them, I find the window to which the > event should belong. Don't

Re: Figuring out which NSView to send an event to

2012-09-04 Thread Graham Cox
On 04/09/2012, at 9:28 PM, Akhil Jindal wrote: > Using NSWindowList, and iterating over them, I find the window to which the > event should belong. Now I have to find the NSView within the window. Ask the window for its firstResponder. That should be the object that events get directed to. It

Figuring out which NSView to send an event to

2012-09-04 Thread Akhil Jindal
Hi, I’m trying to use the Wacom’s Feel Multi-Touch API to capture touch events in my app. I have their cintiq hardware connected to my iMac. The problem I’m facing is that it gives me an event with the screen coordinates on which it happened, and I’m left to figure out on my own, as to which