• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Command-click table in background app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Command-click table in background app


  • Subject: Command-click table in background app
  • From: Bill Cheeseman <email@hidden>
  • Date: Wed, 31 May 2006 06:48:26 -0400
  • Thread-topic: Command-click table in background app

Command-clicking most UI elements while the application is in the background
works -- the element's connected action method is triggered, but the
application remains in the background. I believe this is documented behavior
for all applications, and I need it for my application.

But I can't get it to work for a table view in a scroll view in a drawer.
Other elements in the drawer, such as push buttons and the scroll view's
scroll bar, do trigger their action methods, but the table does not. Ditto
for the table's -tableView:shouldSelectRow: delegate method.  When the app
is frontmost, Command-clicking the table triggers its action method and the
delegate method normally.

Is there a way to make this work? IB won't let me connect an action method
to the scroll view itself.

(Hmm. Doing a little more reading before clicking the Send button, I see
that maybe I have to subclass NSScrollView and override its
-acceptsFirstMouse method to return YES. Testing in the debugger indicates
that it is off by default for scroll views. Does this ring any bells with
anyone?)

--

Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com

PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes


 _______________________________________________
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

  • Follow-Ups:
    • Re: Command-click table in background app
      • From: Bill Cheeseman <email@hidden>
  • Prev by Date: Re: Client ssh
  • Next by Date: Problem subclassing a NSCell in a NSTableView
  • Previous by thread: Re: Use of weak reference in non-circular reference situation
  • Next by thread: Re: Command-click table in background app
  • Index(es):
    • Date
    • Thread