Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How does ReadExpression work?
Message
De
21/10/2001 11:47:42
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
19/10/2001 12:46:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00570921
Message ID:
00571447
Vues:
23
>>>
>>>...
>>>loCol = loGrid.Column5
>>>lcProp = "ReadOnly"
>>>? loCol.ReadExpression(lcProp)
>>>
>>>
>>>I expect the above code to return the value of Column5.ReadOnly, but I get an empty string. What am I missing?
>>>
>>>I have opened a form, selected a grid, and run a short program. The code above is part of this program. The idea of my small builder program is to insert a column (all properties should be copied from column5 to column6, then from column4 to column5, etc.).
>>>
>>>TIA, Hilmar.
>>
>>Apparently it only works if you have previously used the WriteExpression() method on the object and the specific property. Doesn't work with default values or with values entered at design-time or programmatically at runtime directly to the property. This contradicts the documentation which states that it returns the value entered in the properties window. But maybe I am missing something here.
>>
>>I suppose if you want to retrieve the property's value and display it you can always use Transform(object.Property) :)
>
>Upon further inspection, if you enter the property as an expression with a leading "=", it does return the correct text.

Yes, but my program, to transfer columns, must work with any value. I think I will try your previous suggestion, or something similar (eval, or macro).

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform