By Ghulam Nabi Shah | Published on February 16th, 2015 | Last updated on September 30th, 2024 |
Visual FoxPro has many landscapes that are confusing and could even be mistaken for bugs. The more applications that get developed, and the bigger the teams that work on them, and the more often the software is revised, the more class library management skills are important.
Face it: you can’t ship a large application without good class management. As program size increases, proper structure becomes exponentially more important. This blog post is for advanced visual FoxPro developers to help them become a more effective class librarian.
Know the Visual FoxPro Class Browser and Component Gallery, and appreciate what each does best. A class library is simply a physical bundle of classes. When working with visual class libraries you should use the Class Browser. But be mindful because classes should be vague in an assortment of ways.
The good news is, the deeper your class chain of command, the further you’ll appreciate SuperCls.PRG, which also works with Visual FoxPro. This also gives you the capability to edit superclass code while functioning in the class designer’s code editing windows as well.
Remember, you should be using Tools/Options/Field Mapping to generate a set of default classes that Visual FoxPro will request when moving fields from the Data Environment.
From the outside looking in, segmenting classes into libraries seems easy: Remember to keep first-level subclasses in one VCXes, because all forms organized in one VCX, cool controls collected in another, with other VCXes for instances, composite classes and toolbars. Everything is direct and, if something, things should be simple to find.