Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing form properties by reference to a procedure
Message
From
30/11/1998 03:52:43
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Passing form properties by reference to a procedure
Miscellaneous
Thread ID:
00162339
Message ID:
00162339
Views:
63
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.
Next
Reply
Map
View

Click here to load this message in the networking platform