>>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.
>
>Not that I know of, your workaround is as good as it gets. I missed that several times as well.
>
>If anyone knows how to defeat this, I'm interested too.
I don't know of a way innate to VFP, but in the init, I like to add a property called self to my objects.
This.AddProperty('Self', This)
Then, of course, it's easy to send .self as a parameter withing a with...endwith.