Re: NSOutlineView hiding a column while editing a row in another column
Re: NSOutlineView hiding a column while editing a row in another column
- Subject: Re: NSOutlineView hiding a column while editing a row in another column
- From: "Joan Lluch (casa)" <email@hidden>
- Date: Sat, 12 Jul 2008 10:48:00 +0200
El 11/07/2008, a las 17:57, Corbin Dunn escribió:
On Jul 10, 2008, at 4:17 PM, Joan Lluch (casa) wrote:
I have a NSOutlineView which I want to make several columns hidden
in response to a user action. I have set up the outlineColumn to
resize with table and the rest have fixed size, so that when one or
more columns are hidden, the outlineColumn widens accordingly. In
normal conditions everything goes as expected.
However, if the user is editing a row of the outlineColumn and then
decides to hide a different column, the focus ring of the resized
outlineColumn is not changed and the result is a mess of several
columns in that row.
Please log a bug on that; it is a case I hadn't thought of, and
something I need to fix.
I just need a way to tell the outlineView that update the size of
the cell being edited (and its focus ring), or simply a way to
programatically commit and accept the user changes on the cell. I
can not use commitEditing because the outlineView is not bound to
any controller, and I use the data source methods instead.
Just make the window or the tableview the first responder, ie:
[tableView.window makeFirstResponder:tableView.window]; that will
commit editing (well, it will commit it if the textfield really gave
up first responder status).
corbin
Thanks for your reply. Making the window the first responder as you
suggested committed the edition on the cell and the outline view
looked just fine. Thanks for that. Still, when the workaround is not
applied, I think the textfield does not loose its first responder
status because it is still possible to continue writing on it after
the mess has been produced with no other side effect than the visual
one. It is like just the focus ring (and the entire editing rectangle)
is not changed its size.
I will try to reproduce the problem in one of the sample code examples
and will submit a bug report.
In the meantime, can I ask you if you can think of a workaround to
correct the cell's focus ring without having to commit editing. It
should not be that hard because the cell's focus ring (and the whole
mess) is immediately corrected by simple resizing the containing
window by its edge, or by only slightly dragging the divider of a
split view which the outline view is in. I guess that if I could
understand to a more deeper extend the mechanics of resizing windows
and views, I would come to a suitable workaround to this problem. Any
hint will be appreciated.
Joan Lluch
_______________________________________________
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