Page 1 of 1

To Nageswarao: datepick control problems also on change

PostPosted: Fri Jul 09, 2021 10:25 pm
by Silvio.Falconi
Now I have found the error and it seems that the search in the archive works only I still have that datepick problem (on change)

at the beginning when I open the dialog to edit a reservation both in modification and in the first insertion, I go to add a first line in the array that I will use in the xbrowse

Image

and then if it is a modification of a reservation I load all services under the first row of the array

Image


if I activate the changeAll (....) function in ON CHANGE of the datepick control, fwh proceeds to call this function before the user has actually changed the date in the control

Code: Select all  Expand view
 @  22,145 DTPICKER oDtpLast VAR dLast SIZE 90,12 PIXEL OF oFolder:aDialogs[1] ;
      PICTURE "ddd dd mmm yyyy"  UPDATE   ;
        ON CHANGE (oDlg:Update(),;
         ChangeAll( nMode,dFirst,dLast,cTypeRoom,nCella,nInvoice,oPrenotazioni,oSelBtn,oBrowse))


on my changeAll() function I go to check if the element is available in the selected date range, if it is available it creates the first row in the array obviously deleting all the content in oBrowse: arraydata

my function runs correctly because it depends on a modification of the date range by the user

but unfortunately this changeall function is called before any user modification and this is not good

because if I am in modification I have to see the other lines and the program must not delete them

that is practically if one activates a function on change of the datepick control this is processed first of all, because this happens,

Nages had changed the tdtpicke class but unfortunately I have not seen improvements, I still have the same error and I don't know how to fix