Author | Topic: Minor "bug" in tdArBrow() | |
---|---|---|
Jonathan Leeming | Minor "bug" in tdArBrow() on Fri, 21 Aug 2020 08:31:16 -0600 Hi, I came across a minor big in Clayton's tdArBrow() class (tdcArBrow.prg) where if one is editing cells in a browse and have the lJump set to .T. with the :cJumpDir set to "down" (or "downx") if the browse has to scroll to get to the next row it will pop out of edit mode. Clayton was referencing ::nRowPos instead of ::nCurEl. The relevant code segment around line 166 is... ELSEIF (::cJumpdir == 'down' .OR. ::cJumpdir == 'downx') ; .AND. ::rowPos != ::rowCount *nOldPos := ::rowPos <-- Replace this nOldPos := ::nCurEl postAppEvent(xbeP_Keyboard,xbeK_DOWN,,self) nEvent := NextAppEvent(@mp1,@mp2,@oXbp) DO WHILE nEvent <> 0 nEvent := AppEvent(@mp1,@mp2,@oXbp,1) oXbp:handleEvent(nEvent,mp1,mp2) nEvent := NextAppEvent(@mp1,@mp2,@oXbp) ENDDO *IF nOldPos != ::rowPos .AND. ::cJumpdir == 'down' <-- Replace this IF nOldPos != ::nCurEl .AND. ::cJumpdir == 'down' postAppEvent(xbeP_Keyboard,xbeK_ENTER,,self) ENDIF Actually I was just revisiting the code as I write this post and believe the same adjustment likely needs to be made in the preceding lines where cJumpDir is set to "nextrow". Every time I explore work with Clayton's library I can't help but think how much he contributed to my "life" and likely a good portion of the development community as a whole. Regards and stay safe... Jonathan jonathan.leeming@familycentre.org Edmonton, Alberta, Canada |