Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Use of equal sign in property sheet
Message
From
19/08/2005 16:16:00
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
19/08/2005 11:13:50
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:
01042407
Views:
29
>Sergey --
>
>So, when is this evaluated? Clearly, from your response, it's not at compile time. Clearly, as well, if I enter an expression (such as my first example) it's evaluated NOW (which I would have understood as "compile time"). What about the other possible expressions I listed? Can I use an memory variable (that will exist at run time) or call a UDF?

It's evaluated at the moment your control is instantiated. At that time, VFP has no knowledge about compile time constants - compile time may have been years ago.

The UDF may work, if it exists and can be found during the control's instantiation. The variable... well, may or may not work, depending on its scope and the context in which the control is while it's instantiated (which may pretty well be its private limbo somewhere :). It also may require special syntax, like =(m.var) or something like that - again, the m.var best be global at the time.

Still, if you want to play such tricks on captions of objects (or other text-only properties), you better do that in code, you're more in control. Also, there may be some surprises about the second instance of the same class (the value you get stays the same regardless of the current value of the expression) - didn't really do that, at least not with success, so can't tell you what's up exactly. I've found that doing that in code or subclassing as needed is more than enough for me.

back to same old

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

Click here to load this message in the networking platform