You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

This is a form example to demonstrate how to use the tracing methods in your RDML code. It uses a trace handler defined from the sample supplied in 7.2 Example Trace Handler. To trace and ensure output is produced create a file TracingOn.txt in the LANSA system folder.

Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_FORM) Caption('Doubleclick an item to test the tracing') Clientheight(322) Clientwidth(626) Height(358) Left(213) Top(160) Width(642) 
Define_Com Class(#PRIM_LTVW) Name(#List) Componentversion(2) Displayposition(1) Fullrowselect(True) Height(249) Keyboardpositioning(SortColumn) Left(0) Parent(#COM_OWNER) Showsortarrow(True) Tabposition(1) Top(0) Width(625) Define_Com Class(#PRIM_LVCL) Name(#LVCL_3) Displayposition(1) Parent(#List) Source(#EMPNO) 
Define_Com Class(#PRIM_LVCL) Name(#LVCL_4) Displayposition(2) Parent(#List) Source(#GIVENAME) Width(36) 
Define_Com Class(#PRIM_LVCL) Name(#LVCL_5) Displayposition(3) Parent(#List) Source(#SURNAME) Width(41) 
Define_Com Class(#PRIM_RDBN) Name(#TraceMessageData) Buttonchecked(True) Caption('Use TraceMessageData') Displayposition(2) Left(8) Parent(#COM_OWNER) Tabposition(2) Top(254) Width(153) 
Define_Com Class(#PRIM_RDBN) Name(#TraceMessageText) Caption('Use TraceMessageText') Displayposition(3) Left(8) Parent(#COM_OWNER) Tabposition(3) Top(286) Width(153) 
Define_Com Class(#Tracing) Name(#TraceHandler) 
Evtroutine Handling(#com_owner.CreateInstance) 
Set Com(#com_owner) Caption(*component_desc) 
Clr_List Named(#List) 
Select Fields(#List) From_File(Pslmst) 
Add_Entry To_List(#List) 
Endselect 
Endroutine 
Evtroutine Handling(#List.DoubleClick) 
If (#TraceMessageData.ButtonChecked) 
#sys_appln.TraceMessageData( "Employee &1 Name &2 &3" #Empno #Givename #Surname ) 
Else 
#sys_appln.TraceMessageText( #Empno #Givename #Surname ) 
Endif 
Endroutine 
End_Com



 
Show Contents List

  • No labels