FROM : I. Savant
DATE : Tue Jan 22 20:57:13 2008
On Jan 22, 2008 2:52 PM, Chris Schmitt <<email_removed>> wrote:
> I understand what you are saying about the objects in the controller
> not being sorted, but I am confused on why I would need a separate
> entity to have my sort order stored correctly. If I could retrieve
> the data using that "sortOrder" attribute, why couldn't I just use any
> of the entity attributes to retrieve the sorted objects?
?? I never said anything about a separate entity.
> Also after reading the posts, I wonder if it would make more sense to
> set a default sort order on the tree's and tables that are using the
> data instead of handling it in the controller. Is this the
> "preferred" way to show the data with a default sort order?
Re-read my post. If you're using bindings, it's best to set the sort
descriptors of the controller driving the view(s) to which they are
bound. Using Core Data, simply add a "sortOrder" attribute to your
entity and use that as the sort key when setting your descriptors.
--
I.S.
DATE : Tue Jan 22 20:57:13 2008
On Jan 22, 2008 2:52 PM, Chris Schmitt <<email_removed>> wrote:
> I understand what you are saying about the objects in the controller
> not being sorted, but I am confused on why I would need a separate
> entity to have my sort order stored correctly. If I could retrieve
> the data using that "sortOrder" attribute, why couldn't I just use any
> of the entity attributes to retrieve the sorted objects?
?? I never said anything about a separate entity.
> Also after reading the posts, I wonder if it would make more sense to
> set a default sort order on the tree's and tables that are using the
> data instead of handling it in the controller. Is this the
> "preferred" way to show the data with a default sort order?
Re-read my post. If you're using bindings, it's best to set the sort
descriptors of the controller driving the view(s) to which they are
bound. Using Core Data, simply add a "sortOrder" attribute to your
entity and use that as the sort key when setting your descriptors.
--
I.S.
| Related mails | Author | Date |
|---|---|---|
| Chris Schmitt | Jan 22, 18:17 | |
| Kyle Sluder | Jan 22, 19:57 | |
| I. Savant | Jan 22, 20:06 | |
| I. Savant | Jan 22, 20:09 | |
| Chris Schmitt | Jan 22, 20:52 | |
| I. Savant | Jan 22, 20:57 |






Cocoa mail archive

