Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Objects and Variables in a Form
Message
 
À
09/12/1998 23:50:16
Andy Roth
Neyenesch Printers
Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00165931
Message ID:
00165973
Vues:
13
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
Fil
Voir

Click here to load this message in the networking platform