Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ON KEYLABEL DEL DO CLASS??
Message
From
22/10/1997 00:40:00
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00055377
Message ID:
00055953
Views:
32
>>If you do it as I stated above, you don't need to worry about the dismiss of those settings anymore.
>Vlad,
>
>But you do have to worry about the user pressing one of those keys while your form is trying to process the updating of fields in a table or any other code that may be executed during the form's running. OKL's are intercommadn interrupts and they will interrupt running code and branch off to somewhere else. This can cause a debuggin nightmare when the user calls to report bad behavior and they fail to mention that they pressed F4 while the forms ws posting transactions to the database.

100% agreed. ON KEY LABEL has some cons and some pros. It depends what you want to do, in my opinion. Sometimes you may want your shortcut keys to interrupt whatever other code is running. Anyway, it's clear that you can't do anything in an ON KEY LABEL and that, whatever you do, you must be very careful. But it was almost the same in FP 2.6. I also believe that if the on key label action can break the app, it means it's a bug there. If the bug can't be fixed, the error is the fact that there is an OKL! :) But there are harmless actions that can be used with OKLs. BTW, I had a request for an OKL that will display the date format (ymd, mdy, etc) in a WAIT WINDOW NOWAIT. Do you see a case when this can blow up my app?

Thanks.

Vlad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform