discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: recent change to NSTableView


From: Wolfgang Lux
Subject: Re: recent change to NSTableView
Date: Fri, 1 Jan 2010 13:11:39 +0100

Hi Matt!

[I hope it is okay for you that I cc'ed this response to the GNUstep
mailing list, since I think it could be of interest for other people.]

Hi Wolfgang, I had some questions about this change here, as I was
under the impression that this was already working except the
"unselected row" part worked differently
It would work for selected or unselected rows, e.g. so that clicking a
"check box" cell, in a table view which allowed dragging multiple
times would toggle the check box on and off,
it seems to me that this change would require you to unselect the row,
then select it again, to do things like toggle checkboxes? (i haven't
tried it)

No. It is exactly the opposite. Without my change you had to click twice
into a check box to toggle its setting when the table view allows dragging.
The first time in order to select the respective row and then upon the
second time the check box would really toggle. This behavior was really
annoying and it is not necessary when dragging is disabled. With my change a click into a check box will have an immediate effect whether dragging is enabled or not. (I guess, it is needless to say that OS X behaves the same).

anyhow the way it was supposed to work was that if
(draggingOperationPossible == YES) by the time it got to NSLeftMouseUp
it meant the same as "dragging never occured",
I haven't looked at this code in a while so it could be that something
changed inbetween the last time i've looked at it and your change
which broke the original behaviour, or i could easily be missing
something subtle.

I guess the point you are missing is that draggingOperationPossible is set to NO when you click into an unselected row. Now this may be different from
when you looked at the code last and it is certainly different from OS X
where you can drag an unselected row. However, I deliberately did not
attempt to implement this on GNUstep -- at least for now -- since after
code inspection I felt unsure that the current code is prepared to handle dragging an unselected row (plus it may break existing programs). Furthermore, I had not enough time to test such change thoroughly. So feel free to consider
my change a stop gap measure and improve it.

though the code doesn't/won't work with NSPopUpButtonCell's and slider
cells and stuff which requires mouse loops (well i guess slider cells
could kinda work, you just couldn't drag the 'handle')

Indeed there are still shortcomings of the current code (e.g., pop up
button cells), but I believe my change didn't make anything worse than
it was before.

anyhow if you could shed any light on the cases where this wasn't
working as intended, or further explain i would appreciate it.

Revision 29161  - (view) (download) - [select for diffs]
Modified Wed Dec 23 00:21:40 2009 CET (8 days, 14 hours ago) by wlux
File length: 161454 byte(s)
Diff to previous 29137

Usability improvement: A single click into a cell of an unselected row
of a table view now can change the cell's state even when the table
view allows dragging.

Regards
Wolfgang




reply via email to

[Prev in Thread] Current Thread [Next in Thread]