Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Validation Techniques
Message
De
02/08/2001 21:54:31
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
 
À
02/08/2001 14:25:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00539007
Message ID:
00539197
Vues:
11
>I have a textbox where a pricecode can be entered, or a commandbutton can be used to bring up a form for pricecode selection.
>
>When I am in textbox and press the button, I do not want to run the validation routine for the textbox.
>
>I know I can detect if the mouse is over the button and return .T., but if you just happen to be sitting over the button, a bad code could be keyed.
>
>Any guidance would be appreciated.

I have a Form property (.L_Picking) that I toggle and test for in .Valid to handle cases like this; eg. If .L_Picking = .T., bypass the validation.

If you always subclass your controls and "delegate" logic like .When and .Valid to "virtual" events like .My_When and My_Valid, then it is simple to add extra logic like this; ie. it allows you to create your own "default logic" that executes "before" any other custom logic without having the custom logic explicitly call any default/special behaviour in the parent class.

I also have another flag (.L_Focusing) that handles programmed changes in Focus where a .Valid might kick in when it is not appropriate.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform