how do i force NSArrayController to sort?
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