the GOTFOCUS clause in DCBROWSECOL fires in a continuous loop when you double click in a different column
DCBROWSECOL FIELD ROP->part_no PARENT oBrowseRoParts HEADER 'Part No' WIDTH 10 ;
GOTFOCUS {||(wtf 'part number gotfocus clause'), IIF( PARTS->(dbseek(rop->part_no+rop->vendor)),;
(TL_TableView( 'PARTS', ROP->part_no, 'PARTS', .t., .t. ),.t.),;
(dc_msgbox('No such part number on file'),.t. )) } ;
EDITPROTECT {||tl_IsSerial()};
EDITOR 'GET_ROP_PART_NO' PICTURE '@!'
GOTFOCUS fires when column NOT in focus
GOTFOCUS fires when column NOT in focus
Jon Steven
Re: GOTFOCUS fires when column NOT in focus
I think that may be due to the WTF.
This generates a call to the debug browse window which causes another GOTFOCUS.
This generates a call to the debug browse window which causes another GOTFOCUS.
The eXpress train is coming - and it has more cars.
Re: GOTFOCUS fires when column NOT in focus
it fires without the WTF, I think it might be because it is the first col in the browse and it get focus by default whenever a refresh occours
Jon Steven
Re: GOTFOCUS fires when column NOT in focus
I'm having a difficult time reproducing this in a test program.
Can you modify the below test program in such a way that it will cause that problem?
Can you modify the below test program in such a way that it will cause that problem?
Code: Select all
#include "dcdialog.ch"
function main()
local GetList[0], GetOptions, oBrowse, aDir
aDir := Directory()
@ 0,0 dcbrowse oBrowse data aDir Size 10,10 fit
dcbrowsecol element 1 header '1' width 10 parent oBrowse ;
GOTFOCUS {|a|Something(oBrowse)}
dcbrowsecol element 2 header '2' width 10 parent oBrowse
dcbrowsecol element 3 header '3' width 10 parent oBrowse
dcbrowsecol element 4 header '4' width 10 parent oBrowse
dcread gui fit
return nil
proc appsys ; return
static function something( oBrowse )
dcmsgbox 'something'
return nil
The eXpress train is coming - and it has more cars.