Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trying to create a class
Message
De
27/11/2001 15:36:04
 
 
À
27/11/2001 15:32:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00586547
Message ID:
00586602
Vues:
13
This message has been marked as a message which has helped to the initial question of the thread.
Michael,

They are assuming you are putting the class in a class library (a .VCX file). You could do that, as Robert has suggested.

I prefer to put this type of code into a program file (rather than a class library). Put the class definition and the code from below in the same .PRG file. You this code (from below) above the class definition. Leave off the SET CLASSLIB COMMAND if you do it this way (I deleted it from below).

Run the program and see what happens.

>Steve,
> The book supplied the following .pgm to test the class, that is where I am getting the error. "Class Definition "timetrans" is not found".
>
>
>ox = CreateObject("TimeTrans")
>
>ox.Add()
>ox.cEmployee = "MB"
>ox.dDate = {^1998-08-01}
>ox.cClient = "SAMS"
>ox.cService = "PROGRAM"
>ox.cDescription = "Work on the book"
>ox.nHours = 8.25
>ox.Save()
>
>ox.Add()
>ox.cEmployee = "MB"
>ox.dDate = {^1998-08-02}
>ox.cClient = "SAMS"
>ox.cService = "USERDOC"
>ox.cDescription = "Write on the book"
>ox.nHours = 8
>ox.Save()
>
Steve Gibson
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform