• 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: Table view active sorting and filter as model changes...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Table view active sorting and filter as model changes...


  • Subject: Re: Table view active sorting and filter as model changes...
  • From: mmalc Crawford <email@hidden>
  • Date: Wed, 23 May 2007 13:37:48 -0700


On May 23, 2007, at 12:34 PM, Shawn Erickson wrote:

How do you get an table view that is bound to array controller that is
connected with a model that is modified in a KVO compliant fashion to
automatically resort itself or refilter itself as the model changes?
So based on not getting any response I assume that I haven't missed a
framework feature that does this automatically for me.
I guess I need to ask the array controller to rearrangeObjects when I
know a property has changed that affects sort order... humm now how to
do that in a reasonable way.

You can observe the values that would affect sort order...
(Hint: there may be a subclassing opportunity...)

The problem, though, is that in general the table view won't know how a model has changed. Although what you're proposing may be reasonable if, say, someone changes a value in a detail field or if a value is changed by an Apple Script, what happens when a user edits a value in a table view that causes the row to be re-sorted or worse removed...? Typically that's likely to provide a poor experience.

mmalc

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: 
 >Table view active sorting and filter as model changes... (From: "Shawn Erickson" <email@hidden>)
 >Re: Table view active sorting and filter as model changes... (From: "Shawn Erickson" <email@hidden>)

  • Prev by Date: Re: How do I make a singleton object AppleScriptable?
  • Next by Date: Re: How do I make a singleton object AppleScriptable?
  • Previous by thread: Re: Table view active sorting and filter as model changes...
  • Next by thread: Re: Table view active sorting and filter as model changes...
  • Index(es):
    • Date
    • Thread