FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour txtfile
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
txtfile
Posted: Mon Oct 12, 2015 07: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 March-April 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
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: txtfile
Posted: Mon Oct 12, 2015 08: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
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: txtfile
Posted: Tue Oct 13, 2015 07:09 AM

Why not using :

FCreate()
FWrite()
FClose()

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: txtfile
Posted: 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 March-April 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

Continue the discussion