PA_IsCompiled


version 2003


PA_IsCompiled → char

Parameter Type Description
This command does not require any parameters
Function result char 1 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