Re: Implementing NSOutlineView autosaveExpandedItems with CoreData

2009-04-03 Thread David Hoerl
[for the archives - old thread] This is a brute force mechanism to save the expanded NSOutlineView items prior to changing a Managed Object context and then restoring them after the modification. - (id)expandedState { NSMutableArray *state = [NSMutableArray array]; NSInteger count = [

Re: Implementing NSOutlineView autosaveExpandedItems with CoreData

2008-07-02 Thread Ian
On 1 Jul 2008, at 17:19, Ron Lue-Sang wrote: On Jul 1, 2008, at 12:05 AM, Andy Kim wrote: Thanks - I've seen solutions like this before, I just wanted to get it working the regular way! I totally understand the sentiment. Is itemForPersistentObject expecting an NSTreeNode? You say you h

Re: Implementing NSOutlineView autosaveExpandedItems with CoreData

2008-07-01 Thread Ron Lue-Sang
On Jul 1, 2008, at 12:05 AM, Andy Kim wrote: Thanks - I've seen solutions like this before, I just wanted to get it working the regular way! I totally understand the sentiment. Is itemForPersistentObject expecting an NSTreeNode? You say you have it working in a similar way - what does you

Re: Implementing NSOutlineView autosaveExpandedItems with CoreData

2008-07-01 Thread Andy Kim
Thanks - I've seen solutions like this before, I just wanted to get it working the regular way! I totally understand the sentiment. Is itemForPersistentObject expecting an NSTreeNode? You say you have it working in a similar way - what does your itemForPersistentObject method return? Man

Re: Implementing NSOutlineView autosaveExpandedItems with CoreData

2008-06-30 Thread Ian
On 1 Jul 2008, at 04:41, Andy Kim wrote: Hi Ian, I've got a CoreData object graph with an outline view showing instances of an NSManagedObject subclass called "Group". The Group class has the standard to-one relation 'parent' and to- many 'children'. The outline view is working perfectly.

Re: Implementing NSOutlineView autosaveExpandedItems with CoreData

2008-06-30 Thread Andy Kim
Hi Ian, I've got a CoreData object graph with an outline view showing instances of an NSManagedObject subclass called "Group". The Group class has the standard to-one relation 'parent' and to- many 'children'. The outline view is working perfectly. I've set autosaveExpandedItems to YES and w

Implementing NSOutlineView autosaveExpandedItems with CoreData

2008-06-30 Thread Ian
Hi all, I've got a CoreData object graph with an outline view showing instances of an NSManagedObject subclass called "Group". The Group class has the standard to-one relation 'parent' and to-many 'children'. The outline view is working perfectly. I've set autosaveExpandedItems to YES and w