Community articleUFLDestroy function
Added by IBM contributorIBM on May 2, 2012
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

No abstract provided.



Description

This function destroys the indicated formNodeP and all of its child nodes.

Function

   r_short UFLDestroy(
      formNodeP aNode
   );


Parameters

Table 1. Function parameters
ExpressionTypeDescription
aNodeformNodePThe form node to destroy. It is valid to pass NULL, in which case nothing happens.


Returns

OK on success or an error code on failure.

Usage details

Digital signatures
This function will not destroy a signed item, except in the case of destroying an entire signed form. Attempting to destroy a signed item causes an error.

Example

In the following example, UFLDereferenceEx is used to locate a particular node. UFLDestroy is then used to remove that node from the structure.
   r_error removeRadios(formNodeP form)
   {
   formNodeP tempNode;
   r_error error;
 
      if ((tempNode = UFLDereferenceEx(form, NULL, "PAGE1.MALERADIO", 0,
         UFL_ITEM_REFERENCE, NULL)) == NULL)
      { 
         fprintf(stderr, "Could not locate MALERADIO node.\n"); 
         return(NOTOK);
      } 
 
      error = UFLDestroy(tempNode); 
      if (error != OK) 
      { 
         fprintf(stderr, "UFLDestroy error %hd.\n", error); 
         return(NOTOK); 
      } 
 
      /* additional code removed */
 
      return(OK);
}


Parent topic:
FormNodeP functions