Re: Another NSOutlineView question
Re: Another NSOutlineView question
- Subject: Re: Another NSOutlineView question
- From: Graham Cox <email@hidden>
- Date: Wed, 10 Dec 2008 11:21:21 +1100
On 10 Dec 2008, at 11:02 am, Corbin Dunn wrote:
Actually, I think the row does have to be selected to allow it to be
edited. Is there a reason you can't let it be selected at this point?
In other words, what are you trying to do? I may be able to offer
another solution.
OK. The outline view represents a list of drawing layers. These can be
organised hierarchically, hence the use of an outline view. The
selected row is used to set the "active" layer, which is the one that
user input is directed to. Layers and Layer groups have names, which
the user can freely edit. However, Layer groups should not be selected
because they can't be made "active" - that would be ambiguous because
it implies that multiple layers could be the target of user input,
thus, I prevent the group items from being selected.
I did also try the idea of using an "active" marker in a separate
table column to indicate the active layer and that worked alright, but
much less obvious and visible than using the selection highlight for
this. It also added another column to the table which I'd prefer to
keep to a minimum width so that the user has the largest available
working space in the window. (The layers table and the content are
side-by-side in a split view).
No; feel free to log a bug request asking for API to easily do this.
You want it to become first responder only in certain situations,
like editing? Something sort of like Mail's sidebar source list? Or
do you have something else in mind?
Almost exactly like that. In fact I'm using the source list style of
view. I don't want it to steal focus from the main content view of the
window unless it really needs it, like when editing, because it's a
real nuisance for the user to have to keep refocusing the main content
view when they just wanted to quickly activate a different layer.
Subclassing is OK - I'm currently doing that anyway to hack around the
row selection change on a checkbox click (When testing the suggested
code I wasn't subclassing, just using a plain NSOutlineView) but if I
can get the behaviour I want without subclassing I would obviously
prefer that.
thanks,
Graham
_______________________________________________
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