Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to create an object in a class
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01092108
Message ID:
01092575
Vues:
18
>Hi David,
>
>It works as you have explained only the zaTime doesn't get instantiated because I'm using foxpro 9.
>
>I was wondering what is the use of dodefault(), what does it do?
>
>Furthermore, what I want to do is to pass the Time object to the Person object (it's just a fictive example). Is the following the way to do this,or are there any better methods:
>
>oPerson = createobject("Person")
>oTime = createobject("zaTime")
>oPerson.Init(oTime)
>oPerson.GetAge()
>
>*** the Function init is then as follow:
>function Init(toTime)
>this.oTime = toTime
>return dodefault()
>
>
>
>Thanks for your help.
>
Zakaria,

You didn't explain why do you want to pass Time object to the Person object. Passing oTime to the GetAge() would work the same
oPerson.GetAge(oTime)
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform