• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSOutlineView: expanding an item retains it?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: NSOutlineView: expanding an item retains it?
      • From: Steven Kramer <email@hidden>
References: 
 >NSOutlineView: expanding an item retains it? (From: Steve Mykytyn <email@hidden>)
 >Re: NSOutlineView: expanding an item retains it? (From: j o a r <email@hidden>)

  • Prev by Date: NSTextView related exceptions
  • Next by Date: Re: Authorization without permanent setuid on helper
  • Previous by thread: Re: NSOutlineView: expanding an item retains it?
  • Next by thread: Re: NSOutlineView: expanding an item retains it?
  • Index(es):
    • Date
    • Thread