TMtxExpression::VarToolTip Method

DewString VarToolTip(const DewString &aName, TValueRec *a);

Returns Tool-Tip or the Hint string to be displayed for the variable with aName.

#NameTypeDescription
1aNameconst DewString &
2aTValueRec *
Remarks:

The value of the variable needs to be passed as param "a" and the name of the variable as "aName". Typically one would write:

aVal := expr.VarByName[aName];
if Assigned(aVal) then   //var was found
begin
    ShowHint := True;
    Hint := expr.VarToolTip(aVal, aName);
end ShowHint := False;

The returned string will contain the name of the variable, its type and the value(s).

Examples
#include "MtxParseClass.h"
#include "MtxParseExpr.h"

using namespace Dew;
using namespace Dew::Math;

void Example()
{
    TMtxExpression* expr = new TMtxExpression();
    DewString aName = "x";
    TValueRec* aVal;
    DewString Hint;
    expr->DefineDouble(aName);

    aVal = (*expr->VarByName)[aName];
    if (Assigned(aVal))   //var was found
    {
        Hint = expr->VarToolTip(aName, aVal);
    }
    delete expr;
}
Declared in Dew::Math::TMtxExpression · Dew.Math/MtxParseExpr.h · Cross-compiler