Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Objects and Variables in a Form
Message
De
10/12/1998 17:00:44
Andy Roth
Neyenesch Printers
Californie, États-Unis
 
 
À
10/12/1998 11:44:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00165931
Message ID:
00166348
Vues:
16
>>Are all objects in a form PRIVATE by nature even if their
>>name is the same as a public object or variable?
>>
>>I know all variables in a program or procedure are
>>private unless they are the same name as a public one.
>>In that case you need to declare the varible as PRIVATE.
>>
>>How do you declare an object in a form as private?
>>can you declare all objects at once in the form as private?
>
>
>To understand the nature of your question, it is necessary to understand what happens when an object is created. The general syntax of an object is;
>
>Public (or Private) NewObjectName
>NewObjectName = CreateObject("ParentClass")
>
>The scope of the object is dependant on whether the object is declared as public or private. I would recommend avoiding public objects that only have function or use within a particular form or method.
>
>Public objects are great for error handling, data access, things like that that will be needed throughout the application.
>
>Just a thought or two on the subject.
>
>Regards,
>
>Jason

What would be the default scope of a form and it's objects contained within?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform