PA_IsCompiled

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

version 2003


PA_IsCompiled char

ParameterTypeDescription
This command does not require any parameters
Function resultchar1 if the database is compiled, otherwise 0.

Description

The command PA_IsCompiled returns 1 if the database is compiled, otherwise it returns 0 (regardless of the 4D environment the 4D plug-in is running).

Example

Your plug-in must not run in an interpreted environment.


   void PluginMain( long selector, PA_PluginParameters params )
   {
      switch ( selector )
      {
         case kInitPlugin :
            if ( ! PA_IsCompiled() )
            {
               PA_Alert("This plug-in can't run in interpreted mode.");
               gPluginIsRunning = false;
            }
            else
            {
            // enter initialization code here if needed.
               gPluginIsRunning = true;
            }
            break;
         
         case 1 :
            if ( gPluginIsRunning )
               aRoutine( params ); // the routine will work only in compiled mode
            break;
      }
   }

Error Handling

PA_GetLastError always returns eER_NoErr


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