I had some afterthoughts over the weekend, and I’m again not perfectly happy with my save/cancel handling when the current control’s valid returns .f. or 0.
Now, if the user wanted to save, I’ll just prevent this and display a message, this does not require any code in the valid.
But if the user wants to cancel it looks that there is no way to do it without some code in the valid.
if lastkey()=17 or lastkey()=27 or ...
return .t.
endif
I’m thinking that, if I put the above code in the valid of all our control classes, it would be easier to have:
dodefault()
>>specific valid code<<
than
if lastkey()=17 or lastkey()=27 or ...
return .t.
endif
>>specific valid code<<
But then, dodefault() is a sign of bad design, is it?
What do you think?
TIA
dz
Doru