Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Activate vs init.
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00052234
Message ID:
00052420
Views:
34
>>>If I declare some variable public, should this go in the init section of a form rather than the activate? Does the activat section get fired every time the form does something then finishes? The init only once?
>>
>>Actually, you should create a new property to hold the value, rather than a PUBLIC variable. If you need the variable after the form is closed, create an application object to hold the property.
>
>In what manner would one create a property to hold a value?
>Like an object, cmdbutton?

In the form designer, go to the menu choice Form, New Property...the rest is straight-forward...

BTW, I think using a public variable is fine...is there any reason to use a property instead of a public variable other than "it is object oriented programming" or "it is cleaner"? In other words, would there be some type of speed advantage or something practical. In my opinion, it is such a minor issue that it is up to the programmer...

Joe
Joseph C. Kempel
Systems Analyst/Programmer
JNC
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform