Step 2.  Add More Trace Statements

In this step, you will add two more trace statements to the filter.

The first tracing statement will show which key was pressed in the surname field. The second statement will show when the EMPLOYEE_CHANGED event was signaled and the employee number passed.

1.   Just after the EVTROUTINE HANDLING(#xEmployeeSurname.KeyPress) event add this statement to trace the value of the key that was pressed:

#AVFRAMEWORKMANAGER.avRecordTraceAValue Component(#COM_OWNER) AValue(#keycode) Event('Key was pressed')

 

 

2.   Now locate the event routine handling the #Com_Owner.avEvent and add this statement to trace when the EMPLOYEE_CHANGED event is triggered and to show the employee number passed by the event:

#AVFRAMEWORKMANAGER.avRecordTraceAValue Component(#COM_OWNER) AValue(#xEmployeeIdentification) Event(EMPLOYEE_CHANGED)

 

3.   Compile the filter.

4.   Start the Framework and expand the iiiHR application.

5.   Turn the application level tracing on using the Framework menu.

6.   Move the focus to the mini filter and press F3. The tracing window shows the key pressed.

 

7.   Next select employees using the filter and then select one employee to display the Employee Details command handler.

8.   Change one of the employee details and click the Save button.

9.   Notice the EMPLOYEE_CHANGED event and the employee number are shown in the trace:

  

10.   Close the Framework.