txtfile

txtfile

Postby Silvio.Falconi » Mon Oct 12, 2015 7:36 pm

some have a sample with txtfile ?
i wish write a message... live it's possible ?
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
User avatar
Silvio.Falconi
 
Posts: 6867
Joined: Thu Oct 18, 2012 7:17 pm

Re: txtfile

Postby cnavarro » Mon Oct 12, 2015 8:38 pm

Look

..\samples\redefine.prg
..\samples\srcview.prg
..\samples\testfile.prg
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6504
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: txtfile

Postby driessen » Tue Oct 13, 2015 7:09 am

Why not using :

FCreate()
FWrite()
FClose()
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.02 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc77
User avatar
driessen
 
Posts: 1399
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: txtfile

Postby 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
User avatar
Silvio.Falconi
 
Posts: 6867
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 72 guests