PA_SetTextInArray

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

version 2003


PA_SetTextInArray (array; index; text; len)

ParameterTypeDescription
arrayPA_VariableArray to access
indexlongIndex of the element to access
textchar *Pointer to the text to put in the index element
lenlongSize of text

Description

The routine PA_SetTextInArray sets the index element of the text array array to text.

Pass a pointer to the new text value in text and its length in len.

If array is not a eVK_ArrayText or if index is out of range, the routine does nothing.

By default, PA_SetTextInArray expect text to use Macintosh characters on Macintosh and ANSI characters under Windows. If you have called PA_UseMacCharacters or PA_UseAnsiCharacters previously, PA_SetStringInArray will expect text to use the specified characters set.

Example

Initialize every element of a text array to a special value.

   void FillTextArrayWith( PA_Variable arr, char *text, long len )
   {
      long   count, i;
      count = PA_GetArrayNbElements( arr );
      for ( i = 1; i <= count; i++ )
         PA_SetTextInArray( arr, i, text, len );
   }

See Also

PA_GetTextInArray, PA_UseAnsiCharacters, PA_UseMacCharacters.

Error Handling

None.


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