Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to create an object in a class
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
How to create an object in a class
Divers
Thread ID:
01092108
Message ID:
01092108
Vues:
55
Hi All,

I want to create an object from an other in a class, but for some reason this isn't possible. I can only do this in a function of a class. For example:
DEFINE CLASS Person as Custom 

cName = ""
dBirthdate = {//}
oTime = null
nAge = 0
oTime = createobject("zaTime") && not possible why????

FUNCTION GetAge()

RETURN  oTime.PointOfTime - dBirthDate

ENDFUNC 



ENDDEFINE 

DEFINE CLASS zaTime as Custom 

m.PointOfTime = DATETIME()


ENDDEFINE 
I was wondering why this can't be done? And what is the solution for this?
Zakaria al Azhar
My blog on Actuaris.net
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform