Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
_Assign method for a std. memvar
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01272418
Message ID:
01272453
Vues:
21
>You can do a lot with #DEFINE and I might be able redefine the memvar so that it points at the new class and the property. Not sure if that's possible, but I think it is.

This might work for you. Notice that you can't name your property the same as the variable because the #DEFINE has "issues" with that later on in the code.
#DEFINE SomeVar ovar.SomeVarProp
ovar=CREATEOBJECT("varobj")

SomeVar = 5
SomethingElse = SomeVar
? SomethingElse
? SomeVar
DISPLAY MEMORY LIKE Some*  && Only see the SomethingElse variable

#undefine SomeVar
DEFINE CLASS varobj as Relation
SomeVarProp = NULL
FUNCTION SomeVarProp_assign(xval)
this.SomeVarProp = xval
ENDFUNC
ENDDEFINE
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform