PA_Dial4DGetText

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

version 2003


PA_Dial4DGetText (dialog; variable; text) long

ParameterTypeDescription
dialogPA_Dial4DDialog reference
variablechar*Name of the variable to access
textchar*Pointer to the buffer that will receive the text
Function resultlongLength of the text

Description

The routine PA_Dial4DGetText returns the text for the variable variable in the buffer pointed to by text. The function returns the length of the text. You can pass a null buffer pointer if you only want to read the length of the text.

Example

   char* text = 0;
   long len;

   // first read the size of the buffer, passing a null pointer
   len = PA_Dial4DGetText( dialog, "vText", 0 );
   
   // if there is a text, allocate a buffer to hold it
   if ( len > 0 )
      text = malloc( len );
   
   // if buffer is allocated, get the text
   if ( text )
   {
      PA_Dial4DGetText( dialog, "vText", text );
      
      /* . . . */
      
      //   free the buffer when it's done with it   
      free( text );
   }

See Also

PA_Dial4DSetText.

Error Handling

None.


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