>I use a lot of public variables using AddProperty()
>
>is there any disadvantage using too much public variables?
If you mean you're adding properties to a public, global object (sometimes called an application object, goApp) that's reasonably good practice.
How many are you using?
As long as you're following the general idea of not giving variables any more scope than they absolutely need, you should be fine. One example of how this can be a problem:
- Suppose you're running a form, but you choose to store some form-related information as properties of your goApp object
- Now, your app specs change, and it's possible you may have more than 1 instance of that form active at once.
In this case, it would be better to have custom form properties rather than adding them to your goApp object.
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up