• 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: DoubleClick and Bindings in an NSTableView (Pre 10.4)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DoubleClick and Bindings in an NSTableView (Pre 10.4)


  • Subject: Re: DoubleClick and Bindings in an NSTableView (Pre 10.4)
  • From: Daniel Jalkut <email@hidden>
  • Date: Tue, 25 Oct 2005 00:09:31 -0400

Hi Josh - thanks for responding. That's an interesting approach, but I have a few concerns:

1. It may happen to work well on your table if you only allow one item to be selected at a time, but it will become unreliable if you decide to allow multiple selection.

2. It's not completely safe to assume that the item that was just double-clicked is now selected, even in a table that allows only single item selection. It may be "safe" if you always require a selection, but you're dealing with a lot of "ifs." What happens if the user holds down the command key while double clicking a (previously unselected) item in your table?

I think if I'm going to try to match up the user's click with the associated item, it's better to use the clicked row number as I'm doing.

Daniel

On Oct 24, 2005, at 6:16 PM, Josh Burnett wrote:

I use [NSArrayController selectedObjects] and just grab the first (and only) item out of the array. Here's how I do it right now:

NSArrayController* tableController = [sender contentController];
id currentObject = [[tableController selectedObjects] objectAtIndex:0];


Sure, you're using the NSArrayController, but you're asking it which one is actually being selected, not just matching the table's selected row with an object in the array returned by arrangedObjects.

_______________________________________________ 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: DoubleClick and Bindings in an NSTableView (Pre 10.4)
      • From: Josh Burnett <email@hidden>
References: 
 >Re: DoubleClick and Bindings in an NSTableView (Pre 10.4) (From: Josh Burnett <email@hidden>)

  • Prev by Date: Catching click on dock icon when application active
  • Next by Date: Re: Threading Question
  • Previous by thread: Re: DoubleClick and Bindings in an NSTableView (Pre 10.4)
  • Next by thread: Re: DoubleClick and Bindings in an NSTableView (Pre 10.4)
  • Index(es):
    • Date
    • Thread