Re: Sort ordering and custom cells
Re: Sort ordering and custom cells
- Subject: Re: Sort ordering and custom cells
- From: Keary Suska <email@hidden>
- Date: Tue, 13 Jul 2010 13:29:36 -0600
On Jul 13, 2010, at 10:38 AM, Gideon King wrote:
> Hi,
>
> I have an NSTableView bound to an NSArrayController, which gets its data from an NSMutableArray of objects.
>
> One column of my table is set up as a button cell where I use tableView:dataCellForTableColumn:row: to return a different button cell (or sometimes nil) depending on the data for that row.
>
> When I sort the table, the buttons are not sorted - they just stay in the row they were in. Ditto for when I add new rows.
>
> What's a good way to fix this?
If I were to hazard a guess--which is what I have to do since you have given us very little to go on--I would say that you need to be using NSArrayController's -arrangedObjects to determine the button value.
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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