Re: Outline view spontaneously collapsing
Re: Outline view spontaneously collapsing
- Subject: Re: Outline view spontaneously collapsing
- From: "Doug Knowles" <email@hidden>
- Date: Tue, 18 Sep 2007 22:20:50 -0400
George, I think you said the magic word: reloadData.
I overlooked it because I've been studying the API for NSOutlineView and
neglecting the methods inherited from NSTableView, causing me to rely way
too heavily on rearrangeObjects.
I've kind of mangled my code trying to implement some workarounds, so it'll
take me a little work to clean it up, but I think I'm on the right track
now.
Thanks to the advice already received, my management of the view's model is
much cleaner, minimizing replacement and modification of the model objects
and eliminating the extra KVO notifications, so I think I'm on the right
track.
Thanks very much for the pointers and your time!
Doug K;
On 9/18/07, George Orthwein <email@hidden> wrote:
>
> Hmmm, unfortunately I don't really have any ideas, but my knowledge
> in this area is quite limited.
>
> I can say that in one of my test projects calling rearrangeObjects on
> the tree controller does collapse all the items. Calling reloadData
> on the view leaves the expansion states intact.
>
> I would tend to think you shouldn't have to manually send KVO
> notifications that the contentArray has changed... it might be
> helpful to give more detail on exactly how you are changing the
> contentArray. As described it sounds like maybe you are filtering out
> different children so essentially different ones are being displayed?
> I'd expect the parent to collapse in that case, but it sounds like
> unrelated parents are collapsing?
>
> George
>
>
_______________________________________________
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