>>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement