Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date in a TextBook Display
Message
From
30/04/2012 16:37:04
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01542880
Message ID:
01542931
Views:
44
>>
>>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.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform