Re: NSArrayController sorting
Re: NSArrayController sorting
- Subject: Re: NSArrayController sorting
- From: Guy Meyer <email@hidden>
- Date: Fri, 21 Apr 2006 08:20:28 +0300
Thanks
It turns out I was setting the column value immediately after the
entity creation, instead of at creation, thus the inserted row had
had a nil value when sorted.
Guy
Are the sort descriptors of the table bound to the sort descriptors
of the
NSArrayController?
Greg
On 4/20/06 3:06 PM, "Guy Meyer" <email@hidden> wrote:
Hi
My NSTableView is bound to an NSArrayController which is bound to a
core data context.
The table is sorted via NSSortDescriptors attached programatically.
When I insert new entity to the core data context the table is
updated, however the new row is not sorted.
The next time I insert a new entity the previous row which was not
sorted properly is getting sorted and the new entity is not sorted as
previously and so on ...
To sum it up it looks like the NSArrayController method
"rearrangeObjects" is called just before the new entity is inserted
when it should be called after the entity had been inserted before
the UI is getting updated.
Any insight will be appreciated.
Guy
_______________________________________________
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
_______________________________________________
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