PA_Dial4DSetLong

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

version 2003


PA_Dial4DSetLong (dialog; variable; newValue)

ParameterTypeDescription
dialogPA_Dial4DDialog reference
variablechar*Name of the variable to access
newValuelongNew value of the variable

Description

The routine PA_Dial4DSetLong sets the value of a variable whose name is variable to the value newValue. This command is preferred to the PA_Dial4DSetVariable call because it handles the type conversion for the developer.

If this command is applied to an array it will set the current element of the array.

By default, variable needs to be a null terminated C string. If you have previously called PA_UsePStrings, you must pass a Pascal string to the command.

By default, variable needs to use Macintosh characters set on Macintosh, and ANSI characters set under Windows. You can call PA_UseMacCharacters or PA_UseAnsiCharacters to specifically use Macintosh or ANSI characters.

In order that 4th Dimension knows it must redraw the dialog, all PA_Dial4DSetxxx routines must be squared by calls to PA_Dial4DBeginUpdateVariables and PA_Dial4DEndUpdateVariables.

Example

Change the value of variables in the dialog dRef.

   PA_Dial4DBeginUpdateVariables();
   PA_Dial4DSetLong( dRef, "radioButton_1", 1 );
   PA_Dial4DSetReal( dRef, "VAT", 123.45 );
   PA_Dial4DSeString( dRef, "promptString", "VAT value:" );
   PA_Dial4DEndUpdateVariables();

See Also

PA_Dial4DGetLong.

Error Handling

None.


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