I was looking into my program and discovered that i think I do thinks wrong :
Short description :
DEFINE DIALOG oDlg FROM 60,0 to 750,1900 PIXEL TRUEPIXEL TITLE cTitle GRADIENT aGrad
@ 0, 0 FOLDEREX oFld SIZE oDlg:nWidth, oDlg:nHeight ;
PROMPT "Basis","Historiek","Art. Foto's","Leveranciers","Webshop Basis","Webshop Prijzen","Webshop Groepen","Webshop Staffel","Webshop Teksten","Webshop Kleuren","Ean","Archief","PrijsHistoriek","Upload";
....
oFld:aEnable = { .T., .T., .T.,.T.,.T.,.T.,.T.,.T.,.T.,.T.,.T.,.t.,.t.,.t. }
oFld:SetOption( 1 )
oFld:Show()
oFld:bAction := { || (FolderActions("ARTIKEL",oBrw,oFld)) }
make several Xbrowsres
oBrw[1] = getXBrowser("ARTIKEL",oFld:aDialogs[FOL_BASIS])
oBrw[1]:bChange := { || showpicture("ARTIKEL") }
oBrw[1]:Aankoop:bOnChange = { |oCol,uOldVal| change_art_aankoop(oBrw[1]:aankoop:value,oBrw[1]:bruto:value,"ARTIKEL","AANKOOPVELD",oBrw[1]) }
......
oBrw[3] = getXBrowser("ARTIKEL_FOTOS",oFld:aDialogs[FOL_ART_FOTOS])
oBrw[4] = getXBrowser("NOFOTO",oFld:aDialogs[4])
....
until 9 xbrowser's
ACTIVATE DIALOG oDlg CENTERED
The getxbrowser collect all settings for xbrowse in dbf and generate it. (the needed dbfs for xbrwsers are in the dbf and are opened in the getxbrowser function also.
So I have 9 folders in folderex.
What I see is that when startup the program, ALL 9 xbrowsers are processed and also all the filters are setup.
I was thinking that folder 1 was processed and all others only when they are called (selected from the folderex)
Does this have to do with not using on init clause or so ?
Maybe it is ment to be so ?
My question is esspacialy around the on init() clause or any function that will process a function ONLY when needed.