Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Outline view selection doesn't move when items are inserted?



NSOutline does actually preserve selected item if you (fully) implement persistentObjectForItem: and itemForPersistentObject: That might be overkill for what you're looking for though, and/or might not do it the way you want....

Sandy

On 17 Jan 2008, at 8:52 PM, John Stiles wrote:

OK, you've got it!
rdar://5692750 [NSOutlineView] Selection should track items, not rows


Thanks for your interest here.

I think it would make sense to have this be NO for existing outline views, but in IB, newly-created outline views should set the property to YES by default. That way, you won't break any old apps, but newly written code would be able to take advantage of the improved behavior. And of course, it'd be a checkbox in the IB attributes so you could enable it if you want to use it with existing code.


Corbin Dunn wrote:
On Jan 17, 2008, at 10:37 AM, John Stiles wrote:
Ooh, really? I figured that would be a problem for backwards compatibility. I guess it could be an optional thing though... [outlineView setSelectionTracksItems:YES] or something.

We have ways around compatibility problems :) (generally, they are checks to see what version of the OS you link against). But, for something like this, I'd probably make it opt-in, with a new property.




I've actually filed a bug against the docs already, saying that they should spell out the behavior better:
rdar://5692703 [Docs] NSOutlineView docs don't discuss preservation of selected rows If you want me to file a separate feature request against NSOutlineView as well, I will happily do it.

Please do log a new bug; I think both things are important to get -- a documentation update (which happens more frequently than OS releases with new API), and new API.


corbin
_______________________________________________
√
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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Outline view selection doesn't move when items are inserted? (From: John Stiles <email@hidden>)
 >Re: Outline view selection doesn't move when items are inserted? (From: Jerry Krinock <email@hidden>)
 >Re: Outline view selection doesn't move when items are inserted? (From: John Stiles <email@hidden>)
 >Re: Outline view selection doesn't move when items are inserted? (From: Corbin Dunn <email@hidden>)
 >Re: Outline view selection doesn't move when items are inserted? (From: John Stiles <email@hidden>)
 >Re: Outline view selection doesn't move when items are inserted? (From: Corbin Dunn <email@hidden>)
 >Re: Outline view selection doesn't move when items are inserted? (From: John Stiles <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.