Information générale
Catégorie:
Gestionnaire d'écran & Écrans
You cannot declare an object as private. For that matter, you don't declare objects - you create them..
I suppose the closest way to making something private would be like this:
local oFoo
oFoo = Createobject("class")
You can define private or hidden properties. So, if you want, you could create a private property on a form called foo. Then, in the Init(), you could do something like:
This.Foo = CreateObject("class")
To access the foo property, you will need to use a public method of the form.
Anything you do visually, or with AddObject - will participate in the containerhip hierarchy - and it is in these instances that you cannot define an object as private.
As far as being the same name as a public object or variable, that is not a problem. For example, a public object can be referenced by the public variable that references the object. When an object is a member of another object - either through containership or through an object property, you must access the interface of that object via its parent - which in this case is the form.
Précédent
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