• 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
Re: How to simulate a Mouse Click on a row in NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to simulate a Mouse Click on a row in NSTableView


  • Subject: Re: How to simulate a Mouse Click on a row in NSTableView
  • From: Andrew Farmer <email@hidden>
  • Date: Thu, 10 Jan 2008 19:39:13 -0800

On 10 Jan 08, at 18:19, DongRuchan wrote:
hi,
I have a problem :how to simulate a Mouse Click on a row in NSTableView

I suspect you're asking the wrong question. It is rarely the case that you actually need to synthesize user-interface events. There are usually much cleaner (and more flexible) ways of getting the same effect which don't depend on details of the user interface.


the specific condition is that
there are two tables in a window, we can image it is a phonebook.
in the window, the left table is the groupList, and the right is the userList.


I use a example to show my question
         in the groupList I have several group such as
                      frends
                      family
                      teacher
and so on.
       we click frends row,we can get it's members  in the userList .

How to simulate "click frends row" ,and the userList table to show freds's members?

The question you probably intend to ask here is:

"How can I cause an object in a master-detail interface to be selected?"

If you're working with Cocoa Bindings and NSObjectController (or its subclass NSArrayController), the solution is pretty straightforward: the class supports a number of methods to manipulate the selection.

If you're trying to roll your own implementation of something similar, all bets are off. You can manipulate the selections in a table view manually - the relevant method is pretty obvious - but getting other views to reflect this accurately is your responsibility (and is likely to be messy).
_______________________________________________


Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >How to simulate a Mouse Click on a row in NSTableView (From: DongRuchan <email@hidden>)

  • Prev by Date: Re: How to simulate a Mouse Click on a row in NSTableView
  • Next by Date: Re: deny share file read/write on Mac OS
  • Previous by thread: Re: How to simulate a Mouse Click on a row in NSTableView
  • Next by thread: How to know a file is busy(read/write)?
  • Index(es):
    • Date
    • Thread