Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determine if controlsource is a field or a variable/prop
Message
De
11/12/2001 23:29:06
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00592686
Message ID:
00593090
Vues:
31
This message has been marked as the solution to the initial question of the thread.
Here's the function I use.
* FUNCTION IsField
LPARAMETERS String
* Pass in a string that may be a memory variable,
* a Field_Name, an Alias.Field_Name, or an object reference.
* Returns true if the string corresponds to a field.
* This function allows one to know if a Value must 
* be REPLACEd into a ControlSource, or STOREd to it.

* Depends on SET COMPATIBLE to be set to OFF or FOXPLUS (the default)!

RETURN (OCCURS('.', m.String) = 1 AND USED(JUSTSTEM(m.String)) ;
	AND FSIZE(JUSTEXT(m.String),JUSTSTEM(m.String)) > 0) ;
	OR (OCCURS('.', m.String) = 0 AND FSIZE(m.String) > 0)
>Is there a way to determine if a controlsource was a table field or a property - variable?
>
>I need to know this to assign a new value to the controlsource of an object programmatically. I have added the "controlsource" property to a container and i need a way to reassing a value to this controlsource.
>
>Fields use the REPLACE command and properties/variables use the "=" assignation.
>
>Any clue?
Charlie
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform