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

on xbrowse I have
oGrid3:={|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
cambia function
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 ?

on xbrowse I have
oGrid3:={|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
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
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 March-April 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
I use : FiveWin for Harbour March-April 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