I know subject is confusing let me explain.
I have a Class (Address) with validation codes in its Container LostFocus Event
which validates the values of objects (e.g. txtbox, combobox) in the container.
When I edit the values on the Address Class and Click another Button outside of the Class
which triggers the Address Class LostFocus Event, validates the Values of its object
If any of the Values are invalid return .f. in the lostfocus event and focus on the invalid value.
The issue is that the Click Event of the button is firing even if the whole LostFocus routine is executing
It somehow gets inserted before the LostFocus is done.
This is only encountered on the second try,
where the user's address is invalid, clicks in the button and choose to change to an invalid address
and click on the button again
Class Container LostFocus Methsd
This.AddrValid = .t.
if !This.IsValidAddress() -- > This shows a message “Do you want to update the Address? Y/N”
This.TxtAddress.SetFocus()
This.AddrValid = .f.
endif
(<----Somehow the Click Event of the Button is misfiring here)
if This.AddrValid
return .t.
else
nodefault
return .f.
endif
Any help is deeply appreciated, as I have no idea why this is happening
I have a Class (Address) with validation codes in its Container LostFocus Event
which validates the values of objects (e.g. txtbox, combobox) in the container.
When I edit the values on the Address Class and Click another Button outside of the Class
which triggers the Address Class LostFocus Event, validates the Values of its object
If any of the Values are invalid return .f. in the lostfocus event and focus on the invalid value.
The issue is that the Click Event of the button is firing even if the whole LostFocus routine is executing
It somehow gets inserted before the LostFocus is done.
This is only encountered on the second try,
where the user's address is invalid, clicks in the button and choose to change to an invalid address
and click on the button again
Class Container LostFocus Methsd
This.AddrValid = .t.
if !This.IsValidAddress() -- > This shows a message “Do you want to update the Address? Y/N”
This.TxtAddress.SetFocus()
This.AddrValid = .f.
endif
(<----Somehow the Click Event of the Button is misfiring here)
if This.AddrValid
return .t.
else
nodefault
return .f.
endif
Any help is deeply appreciated, as I have no idea why this is happening