• 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
NSTable View Selected Cell question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTable View Selected Cell question


  • Subject: NSTable View Selected Cell question
  • From: Bruce Truax <email@hidden>
  • Date: Fri, 12 Aug 2005 10:29:18 -0400

I have an NSTableView which displays arranged objects from an NSArray.
After editing a cell in the table it is necessary to update the array.  I do
this by observing changes in key paths.  This works well except that after I
edit a cell and repopulate the array (and hence the table via bindings) the
highlighted row changes to the first row.  This is rather annoying.  I would
prefer that the selected cell remain selected but it is not obvious how to
do this.  I can retrieve the selected row using [NSTableView selectedRow]
but [NSTableView selectedColumn] always returns -1 so I cannot easily get
the column selected.  My questions are:

1.  How can I get the indices of the selected cell.

2.  After updating my table, how can I reselect the cell determined in 1.

Bruce
--
____________________________________________________________
Bruce E. Truax                 email:  email@hidden
Optical Engineering Consultant

             Diffraction Limited Design LLC
388 Wedgewood Road             voice:  860-276-0450
Southington, CT  06489         fax:    860-620-9026
http://www.dld-llc.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

  • Follow-Ups:
    • Re: NSTable View Selected Cell question
      • From: "Marcus S. Zarra" <email@hidden>
  • Prev by Date: Re: How to Create Charts & Graphs
  • Next by Date: Robust audio playback using NSSound...
  • Previous by thread: Re: Improving 10.3 scroll bar auto-hide behaviour?
  • Next by thread: Re: NSTable View Selected Cell question
  • Index(es):
    • Date
    • Thread