Page History
Show Contents List
You are here: Visual LANSA User Guide > 7. Tracing Applications > 7.4 Example Use of Tracing
...
7.4 Example Use of Tracing
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
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