Step 5 Document your Event and Property

VLF Windows Application Development

Step 5. Document your Event and Property

VFW072 – Create a Department Dropdown Reusable Part

These exercises have emphasized how to discover the help text build into all shipped components by using F2 Features help. In this step you will learn how to document your own components.

When designing and building your application, reusable parts enabled you to create components designed for re-use, such as the department dropdown which you have just built. These components will be much more useful if you document them so that other developers will easily understand them and want to use them.

1.  Events, property and method statements have optional Desc() and Help() keywords. Help should be used to document your own reusable parts. F2 Features help will then be able to display this information for other developers.

     Method routines will usually have one or more Define_Map statements. These should also be documented using Help().

2.  Open your department dropdown RP in the editor. Add appropriate help text to the event and property statements. For example:

Define_Evt Name(UDepartmentChanged) Help('This Event is signalled when the selected department changes')
Define_Pty Name(uCurrDepartment) Get(*auto #deptment) Set(SetDept) Help('Current department code')

 

3.  Recompile your component.

4.  Switch to the Employee Details command handler in the editor (iiiVFW06). Select the department dropdown component in the Design view.

a.  Either press F2, or use the context menu to select: Reusable Part: IIIVFW11 / Features.

b.  Expand Properties and double click to display help for uCurrDepartment.

c.  Expand the Events and double click on uDepartmentChanged to display its help.