Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bug ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Re: Bug ?
Divers
Thread ID:
00751012
Message ID:
00751024
Vues:
16
Hi Stephane,

This is a side effect from the following enhancement:
Language Support for Caption Expressions
The DBGETPROP( ) Caption field property for tables and views supports expressions as field captions. For more information, see the tables listing the field properties for tables and views in the DBGETPROP( ) Function.

Note   Support for using expressions as field captions should be used only with DBC tables in applications running on Visual FoxPro 8.0 or later. In earlier versions, the expression appears as a string literal.
You can retrieve a field caption as stored in a database container (DBC) using the FIELD( ) function. For more information, see FIELD( ) Function.
The new behaviour is as follows.
Whenever the caption starts with an "=", it will evaluate the rest of the caption and put that result back into the caption.
For instance
label.caption="=Thisform.caption"
will make the caption of the label the same as the caption of the form. When you enter that caption in the PEM sheet, you will see the caption of the form in the label itself, but you will see =Thisform.caption in the pem-sheet.

But the 2 things that make this enhancement difficult to control in Data Dictionary driven applications are:
1. When the expression in the caption returns a string that starts with an "="-sign it gets re-evaluated again. (This is done recursively till it does not start with an "=") (And you cannot evaluate an empty string)
2. There is no way to overrule this, it is impossible to have a caption that starts with an "=" and show that one to the user.

(If this wasn't done recursively you could use ="=" as the caption but unfortunately we can't use it)

You already mentioned the only workaround and that is to have a caption of " =" instead of "=".

So for me, the only way to make this work is to have all my captions start with an space. Thank god, all my captions are data-driven, so for me it only a few lines of code that I need to set. (Init of the label and the form-builder)

>After a little more testing:
>
>This.Label1.Caption = " =" && No error
>This.Label1.Caption = "= " && Error
>This.Label1.Caption = Chr(61) && Error
>
Frank Camp
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform