On 04/09/2012, at 9:28 PM, Akhil Jindal <akhi...@gmail.com> 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 might not be a view but usually is. In any case it will be an NSResponder. Rather than iterating over the windows it also would probably be better to ask NSApp for its mainWindow (or keyWindow) then that window's firstResponder. --Graham _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com