Page 2 of 2

Re: VCard import

Posted: Tue Oct 22, 2019 2:14 pm
by Silvio.Falconi
Nages,

where are these methods

METHOD SaveToDBF() VIRTUAL
METHOD ReadFromDBF() VIRTUAL
METHOD SaveAsText() VIRTUAL
METHOD RestoreFromText( cText ) VIRTUAL
METHOD WriteVCard() VIRTUAL


Image

How I can make to go to the next record ?
How I can to save each record into dbf ?
How I can to export from dbf to vcf ?

thanks

Re: VCard import

Posted: Tue Oct 22, 2019 3:53 pm
by cnavarro
The VIRTUAL clause is used so that these methods are defined in the classes that are created inheriting from the principal.

Re: VCard import

Posted: Tue Oct 22, 2019 4:35 pm
by Silvio.Falconi
Of course....
Cris let me see wich Is the principal class because i not see it

Please ready the Nages topic
and you found the tcard class I mean

viewtopic.php?f=3&t=26196#p143937

Re: VCard import

Posted: Tue Oct 22, 2019 4:38 pm
by cnavarro
Silvio.Falconi wrote:Nages,

where are these methods

METHOD SaveToDBF() VIRTUAL
METHOD ReadFromDBF() VIRTUAL
METHOD SaveAsText() VIRTUAL
METHOD RestoreFromText( cText ) VIRTUAL
METHOD WriteVCard() VIRTUAL



Silvio, where have you copied that code?
In the class where that code was, it is the main class or "parent" class

Re: VCard import

Posted: Tue Oct 22, 2019 7:20 pm
by Silvio.Falconi
Cris i insert the link on message ,there's no parent or inhereit class
Is wrote Only

Class Tvcard
I not see parent class

Re: VCard import

Posted: Tue Oct 22, 2019 7:31 pm
by cnavarro
Silvio, I think I have not explained myself well, or you have not understood my message.
When a method is declared VIRTUAL in a class (in this case TVCard), it is because the programmer will carry out a class (TMyVCard, for example) that will inherit from the initial (TVCard), and in that class the methods that are developed will be developed VIRTUAL declared in the initial class (TVCard).

Re: VCard import

Posted: Tue Oct 22, 2019 7:41 pm
by Silvio.Falconi
yes, I had arrived at this.

Then another problem that the tvcard class reads only the first record instead in the file there are so many.

I think it was made just to read only one vcard, in fact it only points to the first interval "BEGIN: VCARD", "END: VCARD"

but how can you make it read the next interval?

Having only one record is not difficult to insert on a dbf but
basically the problem for me is how to read the other records in the vcf file

maybe I will be able to resolve if I can turn the 00001.vcf file into as many vcf as there are records in my phone book.
but how to do this conversion?