• 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
NSOutlineView expand-by-default with NSTreeController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSOutlineView expand-by-default with NSTreeController


  • Subject: NSOutlineView expand-by-default with NSTreeController
  • From: Benjamin Rister <email@hidden>
  • Date: Sat, 5 Dec 2009 13:43:44 -0500

I have an NSOutlineView in which I would like to have newly-appearing items be expanded by default. (It would be nice if NSOutlineView had support for this built in; rdar://problem/7421928.)

The list archives and a web search reveal a couple hacks to try and make this work, but they depend on feeding the data to the outline view via the NSOutlineViewDataSource protocol so that they can ask for an expansion either at the time of insertion or in response to the outline view asking about the new pieces of data. I’m using NSTreeController, which makes the situation difficult as the actual “items” the outline view knows about aren’t anything I create myself, so I can’t really queue up an expansion of items as I insert them in the model, nor will the outline view ask me about the new data as it’s getting it from NSTreeController.

It would be unfortunate to have to reimplement all of the NSTreeController functionality I’m using just to get a hook to do this, so does anybody know a way to get expand-by-default while still using NSTreeController and bindings? This code requires 10.6, so newfangled API is just fine.

Thanks,
Benjamin Rister_______________________________________________

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

  • Follow-Ups:
    • Re: NSOutlineView expand-by-default with NSTreeController
      • From: Jason Foreman <email@hidden>
  • Prev by Date: Re: Run Javascript Function in iPhone App
  • Next by Date: Re: Programatically Setting Delegate
  • Previous by thread: Re: Run Javascript Function in iPhone App
  • Next by thread: Re: NSOutlineView expand-by-default with NSTreeController
  • Index(es):
    • Date
    • Thread