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:
01092736
Vues:
19
This message has been marked as a message which has helped to the initial question of the thread.
Hi Zakaria,
oPerson = createobject("Person")
oTime = createobject("Time")
oPerson.Init(oTime)
oPerson.GetAge()
this is not the way to pass parameters to the INIT event of an object.
The INIT is an event and not a method thats intended to be called by the developer.
Its called/fired automaticly during the creation process of that object. If you want to pass one or more parameters, you should use the additional parameters of the createobject() function.
oTime = createobject("time")
oPerson = createobject("person", oTime)
Holger Vorberg
Germany
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform