Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Referencing grid objects
Message
De
02/02/1999 11:09:07
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00182747
Message ID:
00182949
Vues:
9
>>Hope this partial code helps :
LPARAMETERS nColIndex
>>[snip]
>>		if !empty(.columns(nColIndex).dynamiccurrentcontrol)
>>			cCurrentControl = eval(.columns(nColIndex).dynamiccurrentcontrol)
>>		else
>>			cCurrentControl = .columns(nColIndex).currentcontrol
>>		endif
>
>Very helpful, thank you (of course it does more than I was trying to). The only thing I don't understand is why you're using EVAL() on dynamiccurrentcontrol. Doesn't it contain a string, the name of the current control, just like currentcontrol does? Why EVAL() one and not the other?
>
>Thanks,
>Rich.
Rich,
You're right it doesn't encapsulate all possibilities and make assumption that currentcontrol and dynamiccurrentcontrol would be used for purpose always. They are different.
Dynamiccurrentcontrol is a string containing an expression for the sake of "dynamic" like :
...dynamicccurentcontrol = [iif(Something, "somecontrol", "someothercontrol")]
or it could just be a function :
...dynamicccurentcontrol = [getmycontrol()]
In both cases I have to evaluate() it to get the controlname.
You could directly put say "Edit1" (or place "=" in front of expression) there but I take it nonsense for "dynamic" is killed and simply writing currentcontrol in a different way :) I was lazy to errorcheck making this assumption.
In fact I believe few ppl use DynamicCurrentControl and know what they do :)
OTOH currentcontrol might be an expression but evaluated already and keeps the controlling control as string where (generally) currentcontrol = "somecontrol".
or :
currentcontrol = "=getmycontrol()" && Evaluator operator
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform