Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Command-click table in background app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Command-click table in background app



On May 31, 2006, at 6:14 AM, Bill Cheeseman wrote:

I'm not sure I understand what you're saying, but I think you may not be
correct, because...


I've now gotten part way to my goal by using IB to set my drawer's table
view as initial first responder. Some old posts to the list indicated that
it might be necessary to do this in my window controller's - awakeFromNib,
but doing it in IB works seems to work. My NSScrollView subclass is
recognized, and now its override of -acceptsFirstMouse: is called when I
click on the table with my app frontmost.


However, -acceptsFirstMouse: is called AFTER - tableView:shouldSelectRow: and
AFTER my -selectRow action method. I haven't thought through the
implications of that yet. Maybe all it means is that - acceptsFirstMouse:
acts as a veto authority after the selection is attempted.


But it still doesn't work when my app is in the background and I
Command-click on the table. I suspect that I also have to subclass
NSClipView and override its -acceptsFirstMouse: to return YES. I won't be
able to try that until tonight.

Hmmm, are you targeting Tiger-only, or Panther also? There are [still?] bugs in NSDrawer (and its private subclasses) which prevent proper handling of the responder chain. I came up with workarounds which might be of use to you, but you'd have to be willing to add a few categories and/or pose some private classes. FWIW, my app uses a tableview in a drawer and all controls in the drawer now work "like they should", without any special treatment.


;)
--
Shaun Wexler
MacFOH
http://www.macfoh.com


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: Command-click table in background app (From: Bill Cheeseman <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.