Benoît Minisini ha scritto: >> Benoît Minisini ha scritto: >> >>>> Benoît Minisini ha scritto: >>>>>>> >>>>>>> >>>>>>> When in the tableview (in edit mode) I press an arrow key, the cursor >>>>>>> slips on every possible cell in the request direction, until it finds >>>>>>> the end of the tableview. But this is not enough: if the cursor key >>>>>>> is Left or Right, the cell walking goes even further, wrapping to the >>>>>>> next or previous row and restarting. >>>>>>> >>>>>>> >>>>>>> > > For sure there is somewhere we don't understand each other. :-) > > I used a few TableView in the IDE: look at the project property dialog, in > the > environment tab. You will see how I implemented them: the insert and delete > button, the Click, Data, Insert and Save event handlers... Please tell me the > difference between what I did there and what you did. > > When you sent me your little example, I just added a Click event handler with > a call to Edit() inside, and everything worked as expected. > > And if things works on some computers without change, maybe they use an old > version of Gambas (< 2.13). > Don't take me wrong. Sometimes it seems to me that you don't read the whole message before replying, and sometimes it seems to me that the real problem is not in evidence (english language plays a role in this...). You say that you just added a Click event handler to get the program work. Well, this is not the problem. The program *is* correct (it does practically nothing). The sample program, without modifications, on some machine runs well, and on other machines shows a problem that I will explain better. When you say "old version of gambas (<2.13)", again it seems that you didn't read carefully what I've posted. In every post I specified precisely what gambas version was installed, what os was running on, and the QT library.
Now the problem. The problem is that, when the grid is in edit mode, if you press a cursor key the cursor does not move to the adiacent cell; it does not stop: it travels all the cells until it stops on the upper-left cell, or the lower-right one. By doing this, it scrolls the tableview up or down, and if the cursor key was Left or Right, it goes to the right-most or left-most, then wraps around and restarts. For every visited cell a Click event is generated. Note that in the sample program there was no Click handler, just to shows precisely that my program does nothing strange in the click handler (by doing nothing, you can't do anything strange). Now you see that I was not complaining about gotfocus, or "not editable" cells, or anything else. I say that a single key press should move the cursor by a single cell, not travel the whole tableview. Now the history. 1. I discovered the error on one machine, with an updated debian stable, gambas v. 2.15.2, libqt-mt.so.3.3.8, while working on an old application. Suspecting that the complexity of the application could have hide something, I wrote a new project (the sample program). Same error. Then I tried it on the other machine: same OS, same libraries, same X server - only gambas different: version 2.0.0. No error. 2. I posted a message on the list, to ask if someone else saw the same error. Two users confirmed it - one gambas 2.16, another with gambas 2.17. So the problem is alive, on at least three machines. 3. I tried on a third machine. Same os, same libraries, gambas 2.15, same remote X server. Identical situation. No error. 4. Now I am at home. Same os, same libraries, gambas 2.0.0. No error. At this point, if someone tells me that I have to modify the program to make it work, I ask myself _why_ it works (I have seen more machines on which the program works well than machines where the problem shows up). On my machines, which are four, I've seen the problem only once. But two users on this list confirmed the error. So, it seems to be an error which shows up rarely, if we want to say so. The only idea I have now is to go back to my first machine and investigate more. It is very difficult to investigate on an error if that error does not show up... Now I ask you: you say you added a Click event to make the program work properly. Why you did so? Why you say this event handler was missing? What was the "wrong" behaviour, when the event handler was missing? I wait for your reply; the next week I will work again on the original machine (the only one where I saw the problem), and I am determined to see over the fog. Regards, -- Doriano Blengino "Listen twice before you speak. This is why we have two ears, but only one mouth." ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user