Hi,
I have a dynamic fill-in widget which uses data from the database in order to determine it's a integer-field,character-field, date-field, etc....
This widget has a persistently run internal-procedure which handles the on 'leave' of the widget.
Well, here's my problem.....
When my fill-in is of type date and i type an invalid date in the field and then press tab, progress shows me a default error.
I do not want to show this message when a user presses the cancel button. In order to do this i put the following code in my persistent leave-procedure....
-------------------------------------
procedure ip_DynamischeLeave:
if (last-event:event-type = "PROGRESS" and
last-event:widget-enter = btn_cancel:handle in frame detail-frame)
then do:
if hnd_waarde:data-type = "date"
then
assign hnd_waarde:screen-value = ?.
return.
end.
...more code....
end procedure.
--------------------------------------
It works fine when i type an invalid date in the field and directly press the cancel button, but when i first give a tab and receive the default progress error ( number 80) and then press the cancel button i receive the same error.
When i keep trying to press cancel it sometimes suddenly exits the program like it should.
I'm very confused, because i don't know what's wrong....
I hope somebody can help me out.
Regards,
Luuk
I have a dynamic fill-in widget which uses data from the database in order to determine it's a integer-field,character-field, date-field, etc....
This widget has a persistently run internal-procedure which handles the on 'leave' of the widget.
Well, here's my problem.....
When my fill-in is of type date and i type an invalid date in the field and then press tab, progress shows me a default error.
I do not want to show this message when a user presses the cancel button. In order to do this i put the following code in my persistent leave-procedure....
-------------------------------------
procedure ip_DynamischeLeave:
if (last-event:event-type = "PROGRESS" and
last-event:widget-enter = btn_cancel:handle in frame detail-frame)
then do:
if hnd_waarde:data-type = "date"
then
assign hnd_waarde:screen-value = ?.
return.
end.
...more code....
end procedure.
--------------------------------------
It works fine when i type an invalid date in the field and directly press the cancel button, but when i first give a tab and receive the default progress error ( number 80) and then press the cancel button i receive the same error.
When i keep trying to press cancel it sometimes suddenly exits the program like it should.
I'm very confused, because i don't know what's wrong....
I hope somebody can help me out.
Regards,
Luuk