PA_FormulaEditor

4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next

version 2003


PA_FormulaEditor (defaultTable; text; len) char

ParameterTypeDescription
defaultTableshortDefault table
textchar *Default formula for the enterable text area
User formula
lenlong *Length of the defaut formula
Length of the user formula
Function resultchar1 if the user has validated the dialog box

Description

The routine PA_FormulaEditor displays the 4D standard Formula Editor.

tableNumber is the number of the table whose fields will fill the main list (this can be changed by the user if he uses the table pop-up menu). If 0 is passed, all tables are listed.

formula is the formula displayed in the editor.

len is a pointer to the length of formula. If *len is 0, no default formula will be displayed upon entry.

If the user validates the dialog box, PA_FormulaEditor returns 1 and fills formula with the formula the user has entered. *len contains the length of this formula.

4th Dimension does not execute the formula. This routine is an accessor to the 4th Dimension Formula Editor. Using this routine, the developer can save/execute/tokenize/detokenize user specific formulas.

Example

Execute a user specific formula.

   void UserFormula ()
   {
      char   *formula;
      long   len;

      formula = malloc(32000);
      if(PA_FormulaEditor(0, formula, &len))
         PA_ExecuteMethod(formula);

      free(formula);
   }

See Also

PA_Detokenize, PA_ExecuteMethod, PA_Tokenize.

Error Handling

PA_GetLastError always returns eER_NoErr


4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next