On Aug 21, 2012, at 8:14 AM, Keary Suska <cocoa-...@esoteritech.com> wrote:
> On Aug 21, 2012, at 8:59 AM, Jean Suisse wrote: > >> Thank you very much for your reply. >> >> Id did override acceptsFirstMouse all the way down to the NSTableView >> subclass. And i did the same for acceptsFirstResponder. >> Both acceptsFirstMouse and acceptsFirstResponder are only called for the >> NSTableView. Every time I return YES… without any effect. >> >> Is there a way to propagate all events ? Or should I propagate mouse down, >> up, etc. individually ? > > You can propagate all events via sendEvent:, although I don't recall whether > that is the recommended method. You probably want a more fine-grained > approach, at least only forwarding mouse events that occur within the table > view's domain. Don't override or change acceptsFirstMouse. the table *always* says YES to acceptsFirstMouse, since it will respond to mouse events in a background window when cmd is held down. Also, you don't have to play with sending events manually; instead, see my other response. -corbin > >> On 21 août 2012, at 16:51, Keary Suska wrote: >> >>> On Aug 21, 2012, at 6:48 AM, Jean Suisse wrote: >>> >>>> I have an NSPanel window that contains an NSTableView with the usual setup >>>> (NSPanel -> content view (NSView) -> NSScrollView -> NSTableView -> etc). >>>> When the Panel does not have the focus, clicking on an item of the table >>>> view will first activate the panel. Then a second click will be required >>>> to select the item. This two-click selection is inconvenient. >>>> >>>> I have tried to answer yes to acceptsFirstMouse in the content view, the >>>> scroll view, and the table view without success. Anyone knows how to deal >>>> with this ? >>> >>> If you want the click through to effect the table view, it seems more >>> logical to override acceptsFirstMouse: in an NSTableView subclass, rather >>> than the content view... >>> >>> If somehow the event if being filtered before that point, you could >>> subclass NSPanel to manually propagate the event to the table view... > > > Keary Suska > Esoteritech, Inc. > "Demystifying technology for your home or business" > > > _______________________________________________ > > 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/corbind%40apple.com > > This email sent to corb...@apple.com _______________________________________________ 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