Go to Glossary Search VisualAge C++ Help Go to VisualAge C++ Help Home Page Go to WWW VisualAge C++ Site

User Code

Use the User Code tab in the Class Editor notebook to modify the following:

Required Include Files

Use Required include to specify the names of other files you want VisualAge to include when you generate source code for your application, such as the following:

Constructor Code

Use the Constructor code options to specify the code you want VisualAge to add to the default part constructor. Depending on where you want the code placed in the generated constructor, select the beginning or ending constructor option and enter your code in the bottom box. If you want to add more than one line to the default part constructor, place the code in a user-defined source file as a member function. Then enter a call to the function in this field.

An alternative to placing initialization code in the part's constructor is calling the code from the part's ready event. This event occurs only when the part is constructed. Use any of the following connections as appropriate:

Destructor Code

Use the Destructor code options to specify the code you want VisualAge to add to the default destructor. Depending on where you want the code placed in the generated destructor, select the beginning or ending destructor option and enter your code in the bottom box. If you want to add more than one line to the default destructor, place the code in a user-defined source file as a member function. Then enter a call to the function in this field.


Related procedures
Using Code Strings in Part Properties

Related references
General
Generation Options
Constructor