Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Objects and Variables in a Form
Message
From
10/12/1998 03:43:55
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
09/12/1998 23:50:16
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00165931
Message ID:
00165966
Views:
17
>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?

Andy,
Objects are private in a manner to their owning form because in their object reference hierarchy form is the topmost container (it might be a formset then hierarchy formset.form.object). Thus formA.myObject and formB.myObject and even formA.myContainer.myObject are totaly different. OTOH it doesn't completely reflect private var definition, because you can access to an existing object from any level via its object reference.
To make all objects "private" (more truely local) you can get them in a "control" container. Definitions are not one-to-one applicable as private or local but reflect up to a point.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform