|
![]() |
![]() |
version 2003
PA_Dial4DGetVariable (dialog; variable) → PA_Variable
Parameter | Type | Description | |
dialog | PA_Dial4D | → | Dialog reference |
variable | char* | → | Name of the variable to access |
Function result | PA_Variable | ← | The variable structure of variable |
Description
The routine
PA_Dial4DGetVariable
returns a
PA_Variable
embedding the value of the variable
variable
in the dialog referenced by
dialog
.
Note that it is probably much easier to use direct accessors to variable values, ie.
PA_Dial4DGetDate
,
PA_Dial4DGetReal
,
PA_Dial4DGetArrayLong
.
If
PA_Dial4DGetVariable
is called for a non-existing variable, the variable type is set to
eVK_Undefined
.
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.
WARNING
The handles received for Text, Pictures, and BLOBs belong to 4th Dimension. You should never dispose of them.
Example
Check the value of "aVar", in the dialog dRef.
PA_Variable v;
v = PA_Dial4DGetVariable( dRef, "aVar" );
if ( PA_GetVariableKind( v ) == eVK_Longint )
{
if ( PA_GetLongintVariable( v ) == 3 )
{
/* . . . */
}
}
See Also
Error Handling
None.