Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Menu Shortcuts
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00454279
Message ID:
00454808
Views:
30
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform