Re: NSOutlineView: expanding an item retains it?
Re: NSOutlineView: expanding an item retains it?
- Subject: Re: NSOutlineView: expanding an item retains it?
- From: daniel <email@hidden>
- Date: Sat, 22 Jan 2005 11:22:59 -0800
I think it's fair that the generic case for an outline view is
"non-ownership." If you look at the way it queries the data source for
information, it's reasonable to assume that it only needs most items
for a single "run loop cycle." Mostly, all it does is map your data
into the window, by asking you for details about the data set.
Since an item's "expanded state" is not stored in your data model, the
view has to keep track of it on its own. In this case, the unexpected
retain is probably something as simple as the NSOutlineView class
keeping an array of "expanded items." Then when it asks you for items,
it can simply look for the returned item in its array of expanded
items, and continue mapping your data into the view as appropriate.
Daniel
On Jan 22, 2005, at 6:44 AM, j o a r wrote:
By asking the data source for the items? To me retaining implies
ownership - and I don't think that an outline view should be
considered the owner of the tree of objects that it represents. I
haven't given this a whole lot of thought, so I could be wrong.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden