Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pass variable by reference into a property
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00904349
Message ID:
00904398
Views:
15
Nick,

>What I am actually trying to do is store the parameter by reference in to a property so that it can be changed by an other method.

That you can not do. VFP does not allow you to store addresses of memvars.

Why don't you just use the object property itself instead of some other memvar?

If you stored the name of the memvar you can do what you want:
myMemvar = "nothing"
MyObj.Proc1( "myMemvar" )
MyObj.Proc2()
? mymemvar

procedure proc1( pcMemvarName )
this.cMemvar = pcMemVarName
endproc

procedure proc2()
store "something" to (this.cMemvar)
endproc
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform