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
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
and keywords. Help should be used to document your own reusable parts. will then be able to display this information for other developers.Method routines will usually have one or more
statements. These should also be documented using .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
view.a. Either press
, or use the context menu to select: .b. Expand Properties and double click to display help for
.c. Expand the Events and double click on
to display its help.