Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Objects and Variables in a Form
Message
 
 
To
09/12/1998 23:50:16
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00165931
Message ID:
00165973
Views:
16
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform