PA_Dial4DSetLong


version 2003


PA_Dial4DSetLong (dialog; variable; newValue)

Parameter Type Description
dialog PA_Dial4D Dialog reference
variable char* Name of the variable to access
newValue long New 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.