>>Yes, but how can you send a property by reference to a function?
>>
>>Vlad
>
>My guess is that you'd send a reference to the object to the
>function and let it work on what every it needed to.
>
>Steve
You'd have to make a workaround, if you wanted to have a generalized
function - you'd have to pass the object reference and property name,
and the function would have to work with a lot of macro substitutions or
name expressions, like
Lparam oRef_lp, ArrName_lc
store "something" to ("oRef_lp."+ArrName_lc+"[1]")
...
Kind of kludgy, but feasible.
I've tried this: a command2 button with this in .click:
thisform.chglabel(thisform, "controls")
and this is the chglabel method
Lpara oRef, propname
with thisform.label1
.caption=eval("oref."+propname+"[1].name")
When I click on command button, the label's caption changes into "command1".
Maybe we could do
Local array something_la
=acopy(&("oref."+propname), something_la)
....work with something_la
=acopy(something_la, &("oref."+propname))
....but then it means copying arrays (and I haven't tried that, might be no
good at all), and we wanted referrence, right?