>Code similar to the following gives me a compiler error:
>
>
>with SomeObject
> SomeFunction(., par2, par3)
>endwith
>
>
>I want to pass the object itself - SomeObject - as a parameter. The object reference itself is much more complicated, so I don't want to repeat it in the function call.
>
>I guess as a workaround, I'll have to use an object variable, but I thought there MIGHT be some other way to refer to the object itself, within a WITH.
The VFP's OOP is lacked here.
A possible workaround is:
add to the class a ThisObject property with
procedure ThisObject_Access
RETURN m.This
and then
with SomeObject
SomeFunction(.ThisObject, par2, par3)
endwith
A best VFP design is to support a WITHOBJ Reference
with SomeObject
SomeFunction(WITHOBJ, par2, par3)
endwith