slight delay

slight delay

Postby Silvio.Falconi » Mon May 31, 2021 6:43 am

on a xbrowse I have these columns (I'm creating a procedure to set permissions of users)

Image

on xbrowse I have

oGrid3:bKeyDown:={|nKey| IF(nKey=VK_RETURN,Asigna(oPermessi,oGrid3,oBtnCambia),IF(nKey=VK_F5,Cambia(oPermessi,oGrid3,oBtnCambia),))}
oGrid3:bLDblClick:={|| Asigna(oPermessi,oGrid3,oBtnCambia)}

we are operating on the second column of xbrowse (oGrid3), the user change the data on oPermessi:ABC from "A" to "R" and viceversa



I'm using tdata(base) and oPermessi is a DBF with this structure
Code: Select all  Expand view

aFields := { { "USUARIO", "C", 8, 0 },;
                   { "MODULO", "C", 6, 0 },;
                   { "M", "C", 1, 0 },;
                   { "DESCRI", "C", 30, 0 },;
                   { "PERMISO", "L", 1, 0 },;
                   { "ABC", "C", 1, 0 },;
                   { "TIPO", "C", 1, 0 } }




cambia function
Code: Select all  Expand view


Function Cambia(oPermessi,oGrid3,oBtnCambia)
   IF lABC
     IF oPermessi:Permiso
        IF oPermessi:ABC="A"
           oPermessi:ABC:="R"
         ELSE
           oPermessi:ABC:="A"
         ENDIF
         oPermessi:save(.t.)
        Refr_Btn(oBtnCambia,oPermessi)
      ENDIF
      Refr_Btn(oBtnCambia,oPermessi)
      oGrid3:refresh()
   ENDIF
   oGrid3:SetFocus()
RETURN (NIL)


Refr_Btn(oBtnCambia,oPermessi) is a function where change the state of a button

I think the function Cambia() not have errors but sometimes I saw a slight delay when the record is changed

Sometimes I must press F5 more time to change the record
the same happen when the use click double
the function asigna() is the same of cambia()

I saw a slight delay is I use (tdata)base instead of dbf exlusive

why it happen ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 6772
Joined: Thu Oct 18, 2012 7:17 pm

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 69 guests