When I restart my Core Data application with a to-many relationship my data (presented in NSTableView) is in random order. How do I keep it in that order in which the user left it before quitting the application?
Of course, I can sort the data in awakeFromNib
but that does not give me the precise order the user used to arrange the data (e.g. he might rearrange rows manually).
The details of my document: What I have is an entity "Relationship" in a to-many relationship with an entity "Card" both managed by an NSArrayController. Card has 2 attributes, "number" (int) and "name" (String) displayed via Bindings in two columns of a NSTableView. Sorting is done by clicking on table headers.
How can I preserve the sort order?