Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing form properties by reference to a procedure
Message
De
30/11/1998 03:52:43
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Passing form properties by reference to a procedure
Divers
Thread ID:
00162339
Message ID:
00162339
Vues:
59
I am porting a FPW2.6 application to VFP.
I encountered some (to me) strange behaviour.
I have my SET UDFPARMS set to Value.
I then call a methof from within a form something like.
Do myprocedure with thisform.prop1, thisform.prop2

In the myprocedure procedure the passed arguments contents are changed.
But on returning to the calling form method the contents of the passed arguments are empty again.

If I store the contents of the formproperties into some local defined memory variables and pass on these to myprocedure the changed contents are visible in the calling form method.

Why is Fox behaving different?
Normally by default arguments are passed to procedures by reference, or is this different when the passed arguments are refering to object properties.??
And in fact I don't want to store the object properties into local variables pass them to the method and storing them back again to the object properties.
I know this is not the ideal situation (point of view encapsulation etc..). But you know I'm in a hybrid application moving it slowly to the ideal visual environment. One step at the time.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform