Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Use of equal sign in property sheet
Message
 
To
19/08/2005 16:20:43
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Miscellaneous
Thread ID:
01042267
Message ID:
01054968
Views:
35
Just a follow up, for I was just suffering this today.

As Dragan said, it seems that VCX + Property Sheet + Functions + Cache = Bad Idea, for whatever function you put in the property sheet will only be evaluated once, and it's value is then repeated to all new instances of the class, until a clear class is issued (and all instances previously killed). To see this easily, just create a new class, let's call it PSTextBox, based on textbox and leave everything default but value, where you put, for example =Seconds() (In the property sheet). Now put this textbox based object in a form and run it, the first time you'll get the correct value, but upon running another instance of the form, or even closing this form and running it again, the Textbox's value will not change, it will retain it's value. To force a new evaluation, you need to issue a "clear class PSTextBox" after closing all running instances.
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Reply
Map
View

Click here to load this message in the networking platform