Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data Entry form and Esc
Message
From
15/06/2005 10:06:18
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01023308
Message ID:
01023489
Views:
11
>>>>>The question asks "Do you want to save your changes?" Yes/No/Cancel. It works when you try to close form by close button (on the form, toolbar and right upper corner). I want similar functionality on ESC... I'm thinking, I would have to somehow save the value before ESC in form's property, then restore... But perhaps someone has it fully implemented already and can give me some ideas...
>>>>>
>>>>>Thanks.
>>>>
>>>>Nadya,
>>>>What I'm trying to make clear to you is that you really shouldn't confront the user with THAT question when ESC is pressed. It is simply not the correct way of handling the ESC-key. It is also simpler then. If the user answer NO (inplying no abort), then do RETURN. No Save-action is here justified.
>>>
>>>Peter,
>>>
>>>MereMortals forms have a property - lReleaseOnEsc. If this property is set to true (default), then the ESC should behave the same way, as close button. I don't want to argue, that it's a bad design (perhaps, it is). I am asking a question, how can I make it behave the same way as Close. So far I didn't have any suggestions, which would help me to accomplish it.
>>>
>>>Remember the story about the programmer changing the light bulb? I think it was discussed here < g > I am not that interested in the arguments of that it should not be done (I even agree with this point), but I am interested in the way it could be done, if we set this as the business requirements.
>>>
>>>Thanks.
>>
>>Hi Nadya,
>>Well, I can't help it that nobody else took time so far to answer you. As I made clear in my first post, I'm not in MereMortals and really only wanted to point to the universal principle that ESC should not be used to save. About the light bulb.. if someone here poses a question about how to not save when the Save button is pressed, it would generate some reactions of gurus that this is an odd question, don't you think?
>>BTW, are you sure that lReleaseOnEsc=.T. should generate the same behavior as pressing the close button? Why then is it not called lCloseOnEsc?
>
>I think it should, but we were thinking about form's design again and looked in the old DOS system. The ESC there behaves as Abort, e.g. no question is asked and the pending changes are lost. Perhaps we should discuss it again within the group. However, it will require additional programming anyway, because presently pressing ESC generates the question if you do it like this:
>
>Type something in the textbox, tab to another textbox and press ESC. If you don't tab to second textbox, no question is asked and the changes are lost. By some extra coding I was able to achieve the question asked every time, but the changes are lost anyway, so the question becomes useless.
>
>May be ESC should behave the same way as Cancel every time and all changes should be lost...
>
>I am wondering if there are MereMortals users here and how do you solve this problem in your applications?
>
>Thanks in advance.

Nadya, are you aware of the fact that there is a special Mere Mortals category here?
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform