• 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: NSTableView clickedRow != array Position
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView clickedRow != array Position


  • Subject: Re: NSTableView clickedRow != array Position
  • From: Trygve Inda <email@hidden>
  • Date: Sun, 16 Jul 2006 18:06:39 +0000
  • Thread-topic: NSTableView clickedRow != array Position

>
> I have an NSArrayController that controls an array of dicts. Lets say there
> are 7 dicts in the array. I have an NSTableView that is displaying them and
> everything is working with bindings.
>
> If I click on a column header to sort the array, it works, but then calling
> clickedRow after a double click, returns the real row and not the place in
> the array where the data is.
>
> So...
>
> If row 2 is clicked, how can I figure out which element of the array row 2
> represents as I do not have a datasource... It is all bindings. Obviously
> before anything is sorted row 2 in the table == element 2 in the array, but
> after sorting... Hmmm. Dunno.
>
> I don't see anything in NSTableView's docs like arrayElementFromRowIndex:

Nevermind. Still a newbie at some of this... Got it sorted (no pun
intended).

Trygve


 _______________________________________________
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: 
 >NSTableView clickedRow != array Position (From: Trygve Inda <email@hidden>)

  • Prev by Date: NSTableView clickedRow != array Position
  • Next by Date: Re: Control arrays?
  • Previous by thread: NSTableView clickedRow != array Position
  • Next by thread: NSView to NSImage
  • Index(es):
    • Date
    • Thread