I have made the following video to describe how the attached sample program works:When you and I were training I saw you used DCBDEBUG in a way that you
could click on the app and the browse would refresh with the callstack
information listing appearing immediately.
How would I use DCBDEBUG to do that?
I am trying to inspect gui elements of an app and am unfamiliar with the
code. Thanks!
http://bb.donnay-software.com:8080/tuto ... ebug1.html
You will need to add the following lines of code to your main program:
Code: Select all
DC_Sett('EDITOR','Q.BAT') // Call q.bat as my editor
DebugConfig() // Configure the debug window
DC_ReadGuiHandler({|a,b,c,d,e,f|DebugHandler(a,b,c,d,e,f)}) // install the global handler
STATIC FUNCTION DebugConfig()
LOCAL aConfig := { ;
{'Row', ;
'b', ;
'Object Name', ;
Chr(255), ;
Chr(255), ;
'Object;Proc' }, ;
{ 5, ;
2, ;
20, ;
1, ;
1, ;
13 }, ;
{ nil, ;
.f., ;
nil, ;
nil, ;
nil, ;
{||ProcInfo()} } }
DC_DebugBrowseConfig(2,aConfig)
RETURN nil
* -----------
FUNCTION DebugHandler( nEvent, mp1, mp2, oXbp, oDlg, GetList )
LOCAL aProc
IF nEvent == xbeM_LbClick
DO WHILE Valtype(oXbp) == 'O'
aProc := DC_GetProperty( oXbp, aGETLIST_PROC )
IF Valtype(aProc) == 'A'
IF Upper(aProc[1]) = 'DC_DEBUGWINDOWBROWSE'
EXIT
ENDIF
ProcInfo( aProc[1] + '(' + Alltrim(Str(aProc[2])) + ')' )
WTF oXbp WINDOW 2
EXIT
ENDIF
oXbp := oXbp:setParent()
ENDDO
ENDIF
RETURN DCGUI_NONE
* ------------
GETSETFUNCTION ProcInfo DEFAULT ''
Code: Select all
DCGETOPTIONS .. SOURCEFILE __FILEPATH__