• 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: Q: NSTableView not sorting edited rows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Q: NSTableView not sorting edited rows


  • Subject: Re: Q: NSTableView not sorting edited rows
  • From: Leonard Budney <email@hidden>
  • Date: Tue, 10 May 2005 23:43:40 -0400

Earlier I asked this question:

I'm using an NSTableView, subclassed so the enter key selects the current row as iTunes does. I enabled sorting in the Attributes setting of the inspector in Interface Builder, and it works fine. The problem is, when I edit a cell in the sorted column, the NSTableView doesn't re-sort the entries (as iTunes does); if the edited value is now out of order, the row doesn't change position.

I've found some more information, suggesting that this is a genuine issue with NSTableView, rather than a quirk of my project:


1. The "Todos" sample by mmalc has the same problem: see <http:// tinyurl.com/8pfss>

2. Another newbie had the same problem last July: <http://tinyurl.com/ 9llot>

3. Thomas Lachand-Robert posted to this list the same day as my message, describing the same problem, but with NSOutlineView:

- the outline view has only one column, whose header is not shown. The data should be presented in a fixed order, depending on an integer keyed "index" in the model. Currently I get that by overriding -sortDescriptors in my subclass of NSTreeController. This works when the data is first displayed, but not afterwards, when the data changes. How may I ensure the data are always ordered as required, even as they change?

Any idea how to force the NSTableView to re-sort data when a field is edited?


Thanks!
Len.


_______________________________________________ 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: Q: NSTableView not sorting edited rows
      • From: Leonard Budney <email@hidden>
References: 
 >Q: NSTableView not sorting edited rows (From: Leonard Budney <email@hidden>)

  • Prev by Date: Re: Read-only NSTableView bindings - forcing update
  • Next by Date: Fwd: DocoaBrowser for 10.4?
  • Previous by thread: Re: Q: NSTableView not sorting edited rows
  • Next by thread: Re: Q: NSTableView not sorting edited rows
  • Index(es):
    • Date
    • Thread