Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4    Statistic  

XL.IsInitialized

Checks if libXL library has been initialized.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
XL 4.2 Yes Yes Yes Yes Yes

MBS( "XL.IsInitialized" )

Parameters

none

Result

Returns 1 or 0.

Description

Checks if libXL library has been initialized.
If value is 1, everything is okay.
If value is zero, the library is not initialized and you need to call XL.Initialize function.
On a hosted database this function is better than using a global variable, as the variable can't see if initialization was made on server or client side.

Examples

Initialize when needed:

#Initialize XL
If [MBS( "XL.IsInitialized" ) ≠ 1]
    If [Get ( SystemPlatform ) = -3]
        # iOS
        Exit Script []
    Else If [Get ( SystemPlatform ) = -2]
        # Windows
        Set Variable [$path; Value: "libxl.dll"]
        Set Variable [$key; Value: "win-32213..."]
    Else
        # Mac
        Set Variable [$path; Value: "libxl.dylib"]
        Set Variable [$key; Value: "mac-32213..."]
    End If
    Set Variable [$r; Value: MBS( "XL.Initialize"; $path; "test"; $key )]
    If [$r ≠ "OK"]
        Show Custom Dialog [ "LibXL failed to initialize"; $r]
    End If
End If

See also

Example Databases


XL.Initialize   -   XL.LoadBook

Feedback: Report problem or ask question.




Links
MBS Xojo PDF Plugins