First of all PLEASE don't use Set/GetProperty anymore, it is a HMG3-thing that is only partially ported to HMG4 and introduces some slowness - use only when strictly necessary...
Ricci wrote:Some days ago it workes quit well.
I introduced some changes on september 19, so you should be more precise on "some days ago"...
Anyway, you are sayint that using
works correctly but if you put the following line AT THE SAME PLACE it doesn't work, right ?
Code: Select all
SetProperty ( "Form_7", "LabelY01", "Value", "" )
If you confirm, please have a look at misc.prg:
Code: Select all
FUNCTION SetProperty( cWindow , cControl , cProperty , xValue1, xValue2 )
IF pcount() == 4
&cWindow:&cControl:&cProperty := xValue1
RETURN xValue1
The error that variable Form_7 doesn't exists let me think that Form_7 is LOCAL... visible to the OOP syntax, not visible to SetProperty....
Please try this:
Code: Select all
FUNCTION SetProperty( cWindow , cControl , cProperty , xValue1, xValue2 )
IF pcount() == 4
HMGAPP():&cWindow:&cControl:&cProperty := xValue1 // HERE IS THE CHANGE
RETURN xValue1
and report.
With the change the window is not referenced by its variable but by its name. Not sure if there is a side-effect so I can't commit it now....