Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date in a TextBook Display
Message
De
30/04/2012 16:37:04
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01542880
Message ID:
01542931
Vues:
45
>>
>>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform