help method

Description

Provides help information about each of your custom functions in the form development environment (for example, IBM® Forms Designer).

Method


public void help(
   String thePackageName, 
   String theFunctionName,
   int theFunctionID, 
   com.ibm.form.api.IFSUserDataHolder theFunctionData, 
   com.ibm.form.api.StringHolder theQuickDesc, 
   com.ibm.form.api.StringHolder theFunctionDesc, 
   com.ibm.form.api.StringHolder theSampleCode, 
   com.ibm.form.api.StringListHolder theArgsNameList, 
   com.ibm.form.api.StringListHolder theArgsDescList, 
   com.ibm.form.api.ShortListHolder theArgsFlagList, 
   com.ibm.form.api.StringHolder theRetValDesc, 
   com.ibm.form.api.ShortHolder theRetValFlag
   ) throws UWIException;

Parameters

Expression Type Description
thePackageName String The name of the package that contains the function.
theFunctionName String The name of the function.
theFunctionID int A unique number that can be used to identify the function.
theFunctionData IFSUserDataHolder Reserved. Although this expression is not used, it must be present.
theQuickDesc StringHolder The method sets a short one-line description of what the function does.
theFunctionDesc StringHolder The method will set a longer more detailed description of the function.
theSampleCode StringHolder The method will set an example of the XFDL code used to call your function, including an example of the function parameters.
theArgsNameList StringListHolder The method will set a list of arguments that your function takes. See Usage Details for more information.
theArgsDescList StringListHolder The method will set a description of each of the arguments in the theArgsNameList. See Usage Details for more information..
theArgsFlagList ShortListHolder The method will set a list of bit flags representing the type of each argument that the function takes. See Usage Details® for more information.
theRetValDesc StringHolder The method will set a description of your custom function's return value.
theRetValFlag ShortHolder The method will set a bit flag representing the type of the return value. See Usage Details for more information. Simply use setLiteralEx on this object to store the result.

Returns

Nothing if call is successful or throws a generic exception (UWIException) if an error occurs.

Usage Details

Example

   public void help(String thePackageName, 
      String theFunctionName, int theFunctionID, 
      com.ibm.form.api.IFSUserDataHolder theFunctionData, 
      com.ibm.form.api.StringHolder theQuickDesc, 
      com.ibm.form.api.StringHolder theFunctionDesc, 
      com.ibm.form.api.StringHolder theSampleCode, 
      com.ibm.form.api.StringListHolder theArgsNameList, 
      com.ibm.form.api.StringListHolder theArgsDescList, 
      com.ibm.form.api.ShortListHolder theArgsFlagList, 
      com.ibm.form.api.StringHolder theRetValDesc, 
      com.ibm.form.api.ShortHolder theRetValFlag) throws UWIException
   {
   /* Switch on theFunctionID. This makes it easy for a single FunctionCall
      object to support multiple functions. */
      switch(theFunctionID)
      {
   /* Remember that you must define an ID number for each custom function
      that you create. In the example the constant MULTIPLY represents
      the identification number for the multiply function. */
         case FciFunctionCall.MULTIPLY:
            theQuickDesc.value = "multiplies two numbers together";
            theFunctionDesc.value = "This function takes two numeric " + 
               "parameters and multiplies the two numbers together and " +
               "returns the result.";
            theSampleCode.value = "\tlabel1 = new label\n" + "\t{\n" + 
               "\t\tvalue = testPackage.multiply(\"10\", field2.value);\n" +
               "\t\tsize = [\"10\", \"1\"];\n" + "\t}\n"      + 
               "\tfield2 = new field\n"               + 
               "\t{\n" + "\t\tvalue = \"7\";\n" + "\t}\n";
            
   /* Notice that in defining theArgsNameList, you must create 
     the list before providing a value for each element in the list. */
            theArgsNameList.value = new String[2];
            theArgsNameList.value[0] = "number1";
            theArgsNameList.value[1] = "number2";
   /* Notice that in defining theArgsDescList, you must create 
      the list before providing a value for each element in the list. */
            theArgsDescList.value = new String[2];
            theArgsDescList.value[0] = "The first number";
            theArgsDescList.value[1] = "The second number";
            theRetValDesc.value = "The result";
            break;
      }
}