by Silvio.Falconi » Tue Oct 13, 2015 10:25 am
Driessen,cnavarro,
I have this problem I create txtfile and show each lines into xbrowse on a dialog . On anothe function I use the function scrivitrace() to add text on txtfile class
when I refresh the xbrowse it make error
Local oBrwTesto
Local oText:=TTxtFile():New( "TimeTrace.txt" )
.....
DEFINE DIALOG oDlgCicloMater
// box trace
cTitle:= "Ciclo operazioni"
@ 100, 05 XBROWSE oBrwTesto OF oDlgCicloMater ;
SIZE 220,80 PIXEL ;
COLUMNS "cLine";
OBJECT oText;
FOOTERS NOBORDER
WITH OBJECT oBrwTesto:cLine
:bFooter:= {|| "Linea = " + LTrim( Str( oText:RecNo() ) ) + " / " + LTrim( Str( oText:RecCount() ) )}
:cHeader:= cTitle
END
WITH OBJECT oBrwTesto
:nfreeze := 1
:nMarqueeStyle:= 7
:nStretchCol := 1
:nRowHeight := 20
:lRecordSelector := .f.
:lHScroll:=.f.
END
oBrwTesto:CreateFromCode()
oDlgCicloMater:bStart := { || SysRefresh(), start(oDlgCicloMater,nGiri,oBrwTesto,oText) }
ACTIVATE DIALOG oDlgCicloMater center
return nil
on start function i use
Scrivitrace(oText,"bla bla bla ",oBrwTesto)
....
return nil
Function Scrivitrace(oText,ctesto,oBrwTesto)
if oText:Open()
oText:Add( ctesto )
oText:Close()
endif
oBrwTesto:refresh() <------------------------error
return nil
how I can resolve it ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com