Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Public Variable Losing Scope on Init of Form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00541965
Message ID:
00542006
Vues:
19
>>A public variable is available in the form called by a program. When that form calls a second form, upon entering the Init, it loses scope. The second form uses local parameters, but none are named the same as the public variable. Any ideas?
>>
>>Regards, Renoir
>
>You should stay away from public variables altogether. Instead, make them properties of your application object.

Wayne;

I was once given a VFP application written by a so called VFP programmer. He had used 58 global variables, and declared some in strange places - like the valid of an object. After removing all the public garbage and creating an application object and solving the programming problems all was well.

This was also a classic case of changing data types on the fly (yes in valids of objects) and having things bomb at strange times. The person who wrote this program was fired and took a job at another company at their "hot line". I wish I knew the name of the school he had attended - just to avoid it!

Tom
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform