Gejza,
TFileName() class does not have any DATA members, all are methods.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Gejza Horvath" <
_hsoftkn@nextra.sk> escribió en el mensaje
news:[email=
46446d7d@ozsrv2.ozlan.local...]
46446d7d@ozsrv2.ozlan.local...[/email]
> Thanks,
> this works fine, but a little problem. In class declaration i have:
>
> CLASS GenFile FROM TComponent
> PUBLISHED:
> PROPERTY Size INIT 0
> PROPERTY Position INIT 0
> PROPERTY Bof INIT .T.
> PROPERTY Eof INIT .T.
> PROPERTY Err INIT 0
> PROPERTY Handle
> PROPERTY Name
> PROPERTY FullName
> PROPERTY Extension
> PROPERTY BytesToRead INIT 2048
> PROPERTY Date INIT CTOD(SPACE(8))
> PROPERTY Time
> PROPERTY Path
> PROPERTY Drive
>
> PROPERTY FileName
> .
> .
> ENDCLASS
> *************************
> METHOD New(cFname) CLASS GenFile
> .
> .
> .
>
> WITH OBJECT Self
> :Extension := SUBSTR(cFname,nPosDot + 1)
> :Name := cFileName // Nazov suboru bez cesty ale s
> rozsirenim
> :FullName := :Drive + :Path + :Name // plny nazov
> :Date := FILEDATE(:FullName)
> :Time := FILETIME(:FullName)
> :Size := FILESIZE(:FullName)
> :Handle := 0
> :Position := 0
> :BytesToread := 0
> :Bof := .T.
> :Eof := .T.
> :FileName := TFileName():New(:FullName)
> END WITH
> .
> .
> RETURN Self
> ************************
>
> CLASS TxtFile FROM GenFile
> PUBLISHED:
> PROPERTY Delimiter INIT CHR(13)+CHR(10) // oddelovac riadkov
> PROPERTY LineNum INIT 1 // cislo Riadku, na ktorom stojime
> PROPERTY LineLen INIT 255 // Dlzka riadku
>
>
> METHOD New // Velkost bloku bude riadok
> METHOD ReadLn // Nacitaj N riadkov
> METHOD WriteLn
> METHOD Open
> METHOD Close
>
> ENDCLASS
> ********************************
>
>
> The TxtFile is a subclass of the GenFile class. I'm using this class to
> read a text file line by line and show it in MemoEdit:
> .
> .
> oFile := TxtFile():New("D:projektmulti.prg")
> oFile:Open()
> DO WHILE ! oFile:Eof
> cLine := oFile:ReadLn()
> ::oMemo1:Value += cLine + CRLF
> ENDDO
> oFile:Close()
> .
> .
>
> I have problem with property FileName, which is a standard Xailer class.
> In the Inspect variable window now all the oFile variable properties are
> visible, the Filename displays object of class TFileName, but I can't
> expand it double clicking on it, to show his properties. Any advise?
>
>
> Gejza Horvath
>