Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Objects and Variables in a Form
Message
From
10/12/1998 17:00:44
 
 
To
10/12/1998 11:44:09
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00165931
Message ID:
00166348
Views:
22
>>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?
>
>
>To understand the nature of your question, it is necessary to understand what happens when an object is created. The general syntax of an object is;
>
>Public (or Private) NewObjectName
>NewObjectName = CreateObject("ParentClass")
>
>The scope of the object is dependant on whether the object is declared as public or private. I would recommend avoiding public objects that only have function or use within a particular form or method.
>
>Public objects are great for error handling, data access, things like that that will be needed throughout the application.
>
>Just a thought or two on the subject.
>
>Regards,
>
>Jason

What would be the default scope of a form and it's objects contained within?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform