Where’s the Code?

One question newcomers to Visual FoxPro and object-oriented programming always have is: “Where’s the code?”

If you’re a newcomer when you first use the Visual FoxPro Form Designer to create a form based on a VPM Enterprise form class, you will look at the Methods page on the Properties sheet and see nothing but  “[Default]”. You’ll then run the form and see that it functions properly. You’ll say to yourself: “There must be method code somewhere to run the form, but where is it?”

Here’s the Code: The method code is in the parent VPM-level classes. For example, if you open the VPMFORMS Form_Toolbar class in the Visual FoxPro Class Designer, you’ll be able to see a lot of method code because the Form_Toolbar class is the VPM Enterprise base class for forms that use the toolbar. If you open a subclass of the Form_Toolbar, say, the Form_Singlerecord code, you won’t be able to see much method code because most of the method code that controls the Form_Singlerecord class is in its parent Form_Toolbar class.

More:

Scope Resolution - Very Important!