Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing a property by reference?
Message
De
12/03/1999 17:27:14
Jonathan Cochran
Alion Science and Technology
Maryland, États-Unis
 
 
À
12/03/1999 11:55:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00196859
Message ID:
00197035
Vues:
60
So, modifying oForm.propertyX in the program will actually modify propertyX, but if you pass oForm.propertyX itself to a program and modify the parameter, propertyX isn't actually modified, just the parameter variable. I wonder if this is by design?

Thanks for your response,
Jonathan

>>Can a property (such as a form property) be passed by reference to a .PRG (DO xyz WITH Thisform.rc_Property)? It looks as though it can't be done directly (it can be, by saving the property to a variable, passing the variable, then saving the variable back to the property).
>>
>>Thanks,
>>Jonathan Cochran
>
>You may just send the object reference:
>DO ... WITH Thisform
>and in prg:
>LPARAMETER oForm
>=messagebox(oForm.propertyX)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform