Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using Modeless forms in a very large program
Message
De
25/01/2008 10:58:34
Mike Yearwood
Toronto, Ontario, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01284682
Message ID:
01285530
Vues:
34
>>Not putting code into forms is a mistake in an OOP environment. However, presumably, lots of code should be common to many of your forms. So your first step should be to develop some form classes that contain all the common stuff. Then base your forms on those classes.
>>
>>Tamar
>
>Tamar,
>There are two reasons we use our current method of calling a prg that runs the form:
>1 - Much easier to maintain the code as it is all in one prg and not in some number of methods that must be opened seperatly.
>2 - It decreases the size of the final .exe which now is approaching 10 MB.
>
>What is the difference between putting code in a form and having the code in a prg as far as OOP is concerned? I thought it would be the same.

A class (and therefore it's methods) can be subclassed. A PRG cannot be subclassed. I don't use a single PRG as a container for multiple functions. I use a single PRG as a container of a single function. Those functions are similar to VFPs own internal functions. I also use a VCX as a container of one class. I also add very few methods to a single class. I can therefore open several things at once and multiple programmers can access many things at once too.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform