>>
>>goTbrFuncToolBar.enabled = .T.
>>goTbrSideBar.enabled = .T.
>>SET CENTURY &Thisform.p_CenturyOnOff
>>
>>Thisform.release()
>>
>>I get a syntax error on the SET CENTURY &Thisform.p_CenturyOnOff
>>
>>so I changed that to SET CENTURY Thisform.p_CenturyOnOff
>>
>>and still get a SYNTAX error..... sigh.... what am I overlooking.... ??
Maybe set century &(thisform.p_CenturyOnOff), but I wouldn't even try that - I'm with Tore on this one.
However, my solution would be to use Tom Rettig's envlib.prg and simply, in form's .load() (because .init() may be too late - some behaviors, which may depend on SET()s, may be set in controls' inits, and form.init() comes after all of them), like this:
* form.load()
this.addproperty("setCent", newobject("setcentury","envlib.prg", "", "ON")
and when the form exits, this property vanishes with it, and form.setCent object is released - and as with all classes from envlib.prg, it resets the setting it's in charge of to its previous value (unless you set its .lNoReset=.t.) in its .destroy(), so the oneliner above is all you need.