Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Use of equal sign in property sheet
Message
De
19/08/2005 16:20:43
 
 
À
19/08/2005 16:16:00
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Divers
Thread ID:
01042267
Message ID:
01042408
Vues:
27
Thank you very much. For my purposes, it looks of little use ... code in Init is much more straightforward it seems.

Jim

\>>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.
Jim Nelson
Newbury Park, CA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform