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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to