Skip navigation.
 
mlRe: NSOutlineView autosaving of expanded/collapsed state
FROM : Ralph Manns
DATE : Sun Feb 24 22:35:16 2008

Am 23.02.2008 um 23:44 schrieb Jonathan Dann:

> On 23 Feb 2008, at 01:58, Ralph Manns wrote:
>

>> Hi,
>>
>> is there a solution on Leopard to implement the autosaving of 
>> expanded/collapsed state of an NSOutlineView (bound to Core Data 
>> via NSTreeController).
>> I tried to implement outlineview:persistentObjectForItem; and 
>> outlineView:itemForPersistentObject:. But it doesnt't work, because 
>> NSTreeNode and NSManagedObject don't encode with NSKeyedArchiver.
>> Is there something I am missing, or couldn't state autosaving be 
>> done in Leopard without 'hacks' like in Tiger?
>>

>
> Hi Ralph,
>
> I ran into this too in a non-Core Data app.  I haven't found a 
> solution better than iterating through each row in the outlineView 
> and calling -isItemExpanded (I think that's the method) so I can use 
> the output from this to re-exapnd the rows when I restart my app (or 
> open the document in  the case of a document-based app).
>
> I'd welcome a better solution though!
>
> Jon


Hi Jon,

I haven't found a solution up to now, although I tried everything. So 
I have to do it like you explained.

Ralph.

Related mailsAuthorDate
mlNSOutlineView autosaving of expanded/collapsed state Ralph Manns Feb 23, 02:58
mlRe: NSOutlineView autosaving of expanded/collapsed state Jonathan Dann Feb 23, 23:44
mlRe: NSOutlineView autosaving of expanded/collapsed state Ralph Manns Feb 24, 22:35
mlRe: NSOutlineView autosaving of expanded/collapsed state Jonathan Dann Feb 24, 23:37
mlRe: NSOutlineView autosaving of expanded/collapsed state Ralph Manns Feb 24, 23:45
mlRe: NSOutlineView autosaving of expanded/collapsed state Keith Duncan Feb 25, 00:56
mlRe: NSOutlineView autosaving of expanded/collapsed state I. Savant Feb 25, 01:07
mlRe: NSOutlineView autosaving of expanded/collapsed state Jonathan Dann Feb 25, 23:16