Hello.
I've got a rather simple app with a straightforward UI, but I'm running into a little annoyance due to my unfamiliarity with the tools I'm using.
In my window I've got an NSOutlineView on the left, and an NSTextView on the right. The outlineView displays groups of text, with the upper level being a grouping name, and the child level being the actual texts. The arrangement is something like:
Caland.txt <-- BrahmanGroup entity Title 1 <-- Brahman entity Title 2 <-- Brahman entity Title 3 etc. Katha Aranyaka.txt Title 4 Title 5 Title 6
etc.
When I click on one of the text titles (i.e. Title 2), the brahman's actual text is displayed in the textView. Though the main purpose of the app is not in the editing of the text, this is allowed. However, the order of the text titles (Title 1, Title 2, etc) is not ordered so sometimes Title 1 will appear first, and sometimes one of the others will appear first, apparently depending on whether or not something has been edited.
My top level entity is BrahmanGroup with relevant properties: name: NSString isBrahman = 0 by default brahmans: to-many relationship with destination Brahman entity
where the Brahman entity has relevant properties: name: NSString isBrahman = 1 by default text: NSString
I've got an NSTreeController (BrahmanController) whose ManagedObjectContext is bound to the document's managedObjectContext. It's children keypath is 'brahmans', leaf keypath is 'isBrahman', and predicate is set as 'isBrahman == 0'. I've selected the 'Automatically Prepare Content' checkbox.
The outlineView table column's value (it's a one column table) is bound to the BrahmanController with controller key 'arrangedObjects' and keypath == 'name'
So, after all of that, we breathlessly arrive at the question: How do I make sure that the brahmans are presented in the same order each time the document is opened?
Thanks for helping me untangle this...
Steve.
|