on explorerBar I have :
@ 2.9,12 DTPICKER oDate1 VAR dDataInit OF oPanel1 SIZE 80,20 VALID dDataInit<=dDataFin UPDATE
@ 4.9,12 DTPICKER oDate2 VAR dDataFin OF oPanel1 SIZE 80,20 VALID dDataInit<=dDataFin UPDATE
@ 9.5, 12 CHECKBOX oChk VAR lNumbers PROMPT "Show the numbers" OF oPanel1 SIZE 130,20 UPDATE
oChk:ltransparent:=.t.
I wish call a function when the second date is changed or when lnumbers is changed
oChk:bChange := {|| CHANGE_PLAN( dDataInit,dDataFin,lNumbers),SysRefresh() }
oDate2:bChange := {|| CHANGE_PLAN( dDataInit,dDataFin,lNumbers),SysRefresh() }
But those commands lines repeating twice the function CHANGE_PLAN and when I run the application it execute before CHANGE_PLAN and then show the dialog of the application
Now I use a button as
@ 190, 150 btnbmp PROMPT "Refresh" of oPanel1 pixel size 80, 25 border 2007 action CHANGE_PLAN( dDataInit,dDataFin,lNumbers)
but it is not a good solution because the final user must press this button if he want change the rango Dates and refresh the Panel
Is there a solution for this strange error ?