Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
15 public vars in a form - would it be OK to replace?
Message
From
25/05/2009 19:10:34
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01401862
Message ID:
01401888
Views:
46
This message has been marked as a message which has helped to the initial question of the thread.
>Hi everybody,
>
>We have an application with 15 public variables declared in the Init of the most used form. Do you know how serious the consequences may be if I try to convert them all to form's properties?
>
>Thanks.

I have seen cases where a programmer used public variables because he simply didn't have a thorough understanding of form properties. This causes possible problems, #1, obviously it can conflict with the same variable used somewhere else, and #2, the situation that the form may be opened more than once had not been considered.

If you can take the time, you should certainly try to convert the public variables to form properties - in such cases. But it is necessary to check for each and every variable whether it is not used in other forms - i.e., it may have been used to exchange data between forms.

In cases where data is exchanged between forms, there should usually be some better way, as well - but it may be more complicated to solve those cases.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform