getDollarList()

The function getDollarList() returns the dollar parameters of a panel.

Synopsis

int getDollarList(string panelFileName, dyn_string &dollars);

Parameters

Parameters Meaning
panelFileName The name of the panel whose dollar parameters you want to query, such as "mainPanel.pnl"
dollars A parameter for the returned dollar parameters of the panel.

Return value

The function returns 0 if it was successfully executed.

Error

Description

The function getDollarList() returns the dollar parameters of a panel.

Example

The example returns the dollar parameters of the panel mainPanel.pnl. In the first example dollar parameters $p1 (content: first) and $p2 (content: example) are passed to the mainPanel.pnl in an example panel. Thus, use the code of the first example for a panel with, e.g. a button and call a panel with the file name mainPanel.pnl and panel name mainPanel.

main()


{


  dyn_float dreturnf;


  dyn_string dreturns;


  string strvar = "example";


  ChildPanelOnCentralModalReturn("mainPanel.pnl","mainPanel", makeDynString("$p1:first", "$p2:"+strvar),dreturnf, dreturns);


}

In the second example the dollar parameters are output via the getDollarList() function and the content of the dollar parameters is output via the DebugN($p1) and DebugN($p2) calls. Use this code in the mainPanel.pnl for example for the clicked event of a button.

main(mapping event)


{


  DebugN($p1);


  DebugN($p2);


  dyn_string dollarP;


  int i = getDollarList("mainPanel.pnl", dollarP);


  DebugN("dollarParam:",i, dollarP);


}

Assignment

Graphics

Availability

UI