Marc Venken wrote:Can we trace or see somewhere witch functions have been called since hitting a button or startup...
Ex. Before I see my startup screen, 10's of functions have been called. Can we see it somewhere ?
I would be easy than to see if called functions have to be updated.
I made a small function with Xbrowse to see somewhere what I wanted !
Now I noticed something and i'm not sure that this is intended to be so....
In starting my app. (hitting 1 button for customers) the program executed a filter function 7 TIMES !! before even the screen is opened or a customer is selected.
Looking into the code :
Folderex with 5 xbrowse (invoices, persons, orders, ...) folders AND Xbrowse for each.
These are the line I'm not sure off that I use or place them at the right position
:bgotfocus := { || oBrw[5]:maketotals(),set_factdet()} // Set_factdet = calling the filterfunction
oBrw[5]:bChange := { |oBrw, uOlddata | set_factdet() }
second browse
filter("hist","histfac",str(facturen->factuur))
And at the end off all browsers I use
/// end xbrowses
filterupdate(oKlant,oBrw,oFld) // This will also filter some stuff
ACTIVATE DIALOG oDlg CENTERED
Do you prefer to use the filters on 1 location (all filtering inside this = filterupdate ) or filter on each xbrowse individually ?
Can we avoid the filters to executed without selecting a customer? It will speedup the process of the first sceen of customerdata in a Peer to peer network.
Again, Speed is not that big of a deal at our place, but I think it is not good programming technique, and It is one of the most things that happen (retrieving data's)
(
Code: Select all
// 05 Facturen
Public aVelden5:= { ;
{ "Factuur" , "Factuur" , NIL, 50 }, ; // 1
{ "Klantnum" , "Klant" , NIL, 50 }, ; // 1
{ "Datum" , "Datum" , NIL, 60 }, ; //
{ "vervaldat" , "Verval" , NIL, 60 }, ; // 1
{ "basis" , "Basis" , NIL, 70 }, ; // 1
{ "btw" , "Btw" , NIL, 70 }, ; // 1
{ "Totaal" , "Totaal" , NIL, 70 }, ; // 1
{ "margesom" , "M_Som" , NIL, 70 }, ; // 1
{ "marge" , "M_Per" , NIL, 70 }} // 1
@ 0,0 XBROWSE oBrw[5] size -1,200 PIXEL OF oFld:aDialogs[ 4 ] font oFonts ;
DATASOURCE "facturen" ;
COLUMNS aVelden5;
AUTOSORT CELL LINES NOBORDER FOOTERS
WITH OBJECT oBrw[5]
:nColDividerStyle := LINESTYLE_LIGHTGRAY
:nRowDividerStyle := LINESTYLE_LIGHTGRAY
:bClrRowFocus := { || { CLR_BLACK, RGB(185,220,255) } }
:nMarqueeStyle := MARQSTYLE_HIGHLROWMS
:aCols[1]:cSortOrder = "facturen"
:aCols[1]:bLClickHeader:= {|| oBrw[5]:gotop(),oBrw[5]:refresh() }
:aCols[02]:cSortOrder = "factkl"
:aCols[02]:bLClickHeader:= {|| oBrw[5]:gotop(),oBrw[5]:refresh() }
:lFooter := .t.
:bRecSelHeader := { || "RowNo" }
:bRecSelData := { |o| o:KeyNo }
:bRecSelFooter := { |o| o:nLen }
:oRecSelFont := oFont // optional
:nRecSelWidth := "999" // required size
:basis:nFooterType := AGGR_SUM
:totaal:nFooterType := AGGR_SUM
:M_Som:nFooterType := AGGR_SUM
:MakeTotals()
:bgotfocus := { || oBrw[5]:maketotals(),set_factdet()}
END
oBrw[5]:SetChecks()
oBrw[5]:nHeadStrAligns := AL_CENTER
oBrw[5]:bChange := { |oBrw, uOlddata | set_factdet() }
oBrw[5]:bRClicked := { || XbrShowSizes( oBrw[5] ) }
oBrw[5]:nStretchCol := STRETCHCOL_WIDEST
oBrw[5]:CreateFromCode()
//Facturen historiek TWEEDE BROWSE
filter("hist","histfac",str(facturen->factuur))
Public aVelden6:= { ;
{ "levbon" , "Levbon" , NIL, 50 }, ; // 1
{ "artikel" , "Artikel" , NIL, 80 }, ; // 1
{ "Benaming" , "Benaming" , NIL, 200 }, ; // 1
{ "Aantal" , "Aantal" , NIL, 60 }, ; //
{ "eenh_prijs" , "Prijs" , NIL, 60 }, ; // 1
{ "korting" , "Kor" , NIL, 35 }, ; // 1
{ "aantal*(eenh_prijs - ( (eenh_prijs * korting) / 100))" , "Totaal" , NIL, 60 }, ; // 1
{ "margesom" , "M_Som" , NIL, 60 }, ; // 1
{ "marge" , "M_Per" , NIL, 60 }} // 1
@ 210,0 XBROWSE oBrw[6] size -1,-1 PIXEL OF oFld:aDialogs[ 4 ] font oFontS ;
DATASOURCE "hist" ;
COLUMNS aVelden6;
AUTOSORT CELL LINES NOBORDER FOOTERS
WITH OBJECT oBrw[6]
:nColDividerStyle := LINESTYLE_LIGHTGRAY
:nRowDividerStyle := LINESTYLE_LIGHTGRAY
:bClrRowFocus := { || { CLR_BLACK, RGB(185,220,255) } }
:nMarqueeStyle := MARQSTYLE_HIGHLROWMS
//oBrw[6]:bChange := { || oBrw[6]:MakeTotals() }
END
oBrw[6]:SetChecks()
oBrw[6]:nHeadStrAligns := AL_CENTER
oBrw[6]:bRClicked := { || XbrShowSizes( oBrw[6] ) }
oBrw[6]:nStretchCol := STRETCHCOL_WIDEST
for each cCol in { "Totaal", "M_Som" }
WITH OBJECT oBrw[6]:oCol( cCol )
:nFooterType := AGGR_SUM
END
next
oBrw[6]:MakeTotals()
oBrw[6]:CreateFromCode()
// Einde van Folders =================================================