Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can execute a button click method without showing the fo
Message
De
25/09/2019 08:15:12
 
 
À
25/09/2019 07:16:18
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01671046
Message ID:
01671109
Vues:
60
>>>Just to clarify, when you are saying "never be calls to event method", you mean never code like this?
>>>
>>>*-- Some procedure or a method calling the click of a button:
>>>SomForm.cmdSomeButton.Click()
>>>
>>
>>Yes, that's what I mean. If you find yourself writing code that calls Click or KeyPress or GotFocus or ..., that code belongs in a method that's called from the event and from whatever the other place is.
>
>Almost as a rule, as soon as I moved the code from .click() of a button into a form's method, there would arise another place which would need to use the same code - either a popup, or a toolbar button, or some bound event. Only in rare occasions would the button be the only caller of that method.

Why not just call the .click() event to run the code from those new places that pop up?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform