General information
Category:
Forms & Form designer
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only