Information générale
Catégorie:
Gestionnaire d'écran & Écrans
>>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
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