>>>UPDATE. In the debugger the value in the property PRE_FILTER is .F. So, basically, when using =cTest, VFP evaluates. But this is not what I wanted.
>>
>>Dmitry, are you defining the class in a Visual Class Library (*.vcx) or in a Program File (*.prg)?
>>
>>This is the effect you want, right?
>>
>>
>>PUBLIC cTest AS String
>>
>>m.cTest = "IN_SERVICE = 'Y'"
>>
>>LOCAL DLI AS DL
>>
>>m.DLI = CREATEOBJECT("DL")
>>
>>? m.DLI.PRE_FILTER
>>
>>DEFINE CLASS DL AS Custom
>>
>> PRE_FILTER = m.cTest
>>
>>ENDDEFINE
>>
>
>Are you sure the changes of the value of cTest would be propagated to the property? If it's assigned like this, the assignment happens only when the object is instantiated. Even creating a new object still contains the value as it was for the first instantiated object.
>
Good point, Dragan, but what I want to know is if Dmitry is using a VCX or a PRG, since he questioned himself "the way I set the value to the property". If I got this right, he's not getting cTest at all, and I don't even know if the variable is going to change during the course of the execution if the program.
----------------------------------
António Tavares Lopes