Re: Outline view spontaneously collapsing
Re: Outline view spontaneously collapsing
- Subject: Re: Outline view spontaneously collapsing
- From: "Doug Knowles" <email@hidden>
- Date: Sun, 16 Sep 2007 23:43:58 -0400
On 9/14/07, George Orthwein <email@hidden> wrote:
>
> This may be helpful:
> http://www.corbinstreehouse.com/blog/?p=13
>
George,
The link contains a lot of information I found helpful, but my code is still
not working. Here's a distillation of what I think is relevant:
- My outline view uses a NSTreeController, which is bound to a window
controller's "contentArray", an NSArray which currently contains only the
root node of the tree I'm trying to display.
- The problem I'm observing occurs when I change external criteria for which
children of the non-leaf nodes in the view are displayed. I need to force
the view and its data source to recalculate its content.
- If I send a key-value notification that "contentArray" has changed, the
outline view collapses even if the "contentArray" and the children of the
root node don't change at all.
- If I send a "rearrangeObject" message to the NSTreeController, the outline
view collapses even if I suppress all changes to the actual objects in the
model.
- If I don't do either of the above, by tree doesn't get updated. (In fact,
I don't think I can get the view content to update correctly unless I send
will/did-UpdateValueForKey notifications for the controller's top-level
content and child keys.
- I've considered the possibility that I should try to use the view's
autosave settings, but once I got them to work, they don't seem to apply to
transient changes like the ones I'm making here.
Any advice is welcome...
TIA!!
Doug K;
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden