Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where to put the code?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00128883
Message ID:
00128900
Vues:
26
>Let's say I have a form that has a 'Save' button.
>
>What is the proper or most prefered place to store
>the code associated with this action? I have come
>up with three possibilities and in the most intuitive,
>but perhaps not most optimal order:
>
>2. thisform.save() or this.parent.save()- almost as easy
> to get to the code, and can be called from the button,
> menu or toolbar.

Like Garrett, I think "2" is the correct solution. You can put code into your base class, then overwrite it easily if you need to. And sometimes you'll want to Save from other methods besides the 'SAVE' button.

If you have a button container the behavior is the same. I've found, however, that just when I get a really nice container built I find a form that DOESN'T need one of the buttons. So each of my buttons is separate and I just add them to each form as needed.

JMHO
Barbara
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform