• 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
how do i force NSArrayController to sort?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how do i force NSArrayController to sort?


  • Subject: how do i force NSArrayController to sort?
  • From: Ken Victor <email@hidden>
  • Date: Tue, 23 May 2006 07:23:45 -0700

i've got an NSTableView with an NSArrayController. the table displays entities fine from my model. if i edit one of my model objects i post a change notification (specific to the object that changed) and in my notification routine, i call -[NSArrayController rearrangeObjects] and the table resorts properly; and i can undo and redo the edit (and i post the appropriate notifications) and the table continues to sort properly.

however... (you knew this was coming, right! :-) )

if i have a sheet displayed on top of my window containing the table, if i edit one of my entity objects (via an applescript), all still works well and the table (under the sheet) resorts as expected. now, if i dismiss the sheet and then issue an undo (to undo the edit caused by the applescript), the table doesn't (re)sort. i've set breakpoints and i'm in fact posting my change notification, and my notification routine is being called, and it calls -[NSArrayController rearrangeObjects], but the array controller isn't resorting! i've examined the sort descriptors of the array controller and they are proper.

can anyone suggest some things to look for/at?

thanx,
ken
_______________________________________________
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


  • Prev by Date: Text/Font Size Measurement
  • Next by Date: RE: Selected string in WebView
  • Previous by thread: Re: Text/Font Size Measurement
  • Next by thread: Bound resizing Problem
  • Index(es):
    • Date
    • Thread