Hi,
I'd like to know if it's possible to trigger an action when a setget field is changed in a XBrowse.
Tks
André Dutheil
FWH 13.04 + HB 3.2 + MSVS 10
Hi,
I'd like to know if it's possible to trigger an action when a setget field is changed in a XBrowse.
Tks
oCol:bOnSave( oCol, uOldValue )Thanks for the answer. I'll see what I can achieve with it.
I tried the following:
oBrw1:aCols[ 4 ]:SetCheck( ) // works OK
When I add the folowing line the system crashes while opening the browse.
oBrw1:aCols[ 4 ]:bOnSave := { || msgInfo( "Hi" ) }
The error log is:
Application Internal Error - D:\xProjetos\VavAta\VAVATA.EXE
Terminated at: 2019-11-08 10:23:31
Erro irrecuper vel 9003: Muitas chamadas recursivas ao manipulador de erros
Called from ERRORDIALOG(317) in .\source\function\ERRSYSW.PRG
Called from (b)ERRORSYS(23) in .\source\function\ERRSYSW.PRG
Called from ERRORDIALOG(317) in .\source\function\ERRSYSW.PRG
Called from (b)ERRORSYS(23) in .\source\function\ERRSYSW.PRG
Called from ERRORDIALOG(317) in .\source\function\ERRSYSW.PRG
Called from (b)ERRORSYS(23) in .\source\function\ERRSYSW.PRG
Called from ERRORDIALOG(317) in .\source\function\ERRSYSW.PRG
Called from (b)ERRORSYS(23) in .\source\function\ERRSYSW.PRG
Called from ERRORDIALOG(317) in .\source\function\ERRSYSW.PRG
Called from (b)ERRORSYS(23) in .\source\function\ERRSYSW.PRG
Called from ERRORDIALOG(317) in .\source\function\ERRSYSW.PRG
Called from (b)ERRORSYS(23) in .\source\function\ERRSYSW.PRG
Called from ERRORDIALOG(317) in .\source\function\ERRSYSW.PRG
Called from (b)ERRORSYS(23) in .\source\function\ERRSYSW.PRG
Called from ERRORDIALOG(317) in .\source\function\ERRSYSW.PRG
Called from (b)ERRORSYS(23) in .\source\function\ERRSYSW.PRG
Called from ERRORDIALOG(317) in .\source\function\ERRSYSW.PRG
Called from (b)ERRORSYS(23) in .\source\function\ERRSYSW.PRG
Called from _CLSSETERROR(247) in .\source\function\HARBOUR.PRG
Called from TXBRWCOLUMN:_BONSAVE(15912) in .\source\classes\XBROWSE.PRG
Called from DIGITAENC(421) in .\SOURCES\VAV_ENC.PRG
Called from (b)DGTENCALHE(386) in .\SOURCES\VAV_ENC.PRG
Called from TBUTTON:CLICK(179) in .\source\classes\BUTTON.PRG
Called from TBUTTON:HANDLEEVENT(1755) in .\source\classes\CONTROL.PRG
Called from _FWH(3513) in .\source\classes\WINDOW.PRG
Called from SENDMESSAGE(0)
Called from TDIALOG:COMMAND(433) in .\source\classes\DIALOG.PRG
Called from TWINDOW:HANDLEEVENT(0)
Called from TDIALOG:HANDLEEVENT(1136) in .\source\classes\DIALOG.PRG
Called from DIALOGBOX(0)
Called from TDIALOG:ACTIVATE(304) in .\source\classes\DIALOG.PRG
Called from DGTENCALHE(389) in .\SOURCES\VAV_ENC.PRG
Called from (b)BUILDMENU(80) in .\SOURCES\VAVATA.PRG
Called from TMENU:COMMAND(1552) in .\source\classes\MENU.PRG
Called from TWINDOW:COMMAND(1109) in .\source\classes\WINDOW.PRG
Called from TMDIFRAME:COMMAND(262) in .\source\classes\MDIFRAME.PRG
Called from TMDIFRAME:HANDLEEVENT(0)
Called from _FWH(3513) in .\source\classes\WINDOW.PRG
Called from WINRUN(0)
Called from TMDIFRAME:ACTIVATE(1065) in .\source\classes\WINDOW.PRG
Called from MAIN(55) in .\SOURCES\VAVATA.PRG
I am extremely sorry.
It is not bOnSave.
It is bOnChange
oCol:bOnChange := { |oCol, uOldVal| yourcode }
It works as expected now. Thanks a lot.