« Coming to Zurich, Swi… | Home | MBS FileMaker Plugin,… »

Adding Has*Plugin constants

On the weekend I had an idea: Let's define in the plugin constants, so you can check with conditional compiling if a given plugin part is available. See this example where we can check if our linux plugin is available:

#if MBS.BuildNumber < 19123 then // older plugins MsgBox "Older Plugin. so status unknown." #elseif MBS.HasLinuxPlugin then // newer plugins and MBS Linux Plugin installed MsgBox "Linux Plugin is installed." #else // MBS Linux Plugin is not installed. MsgBox "Linux Plugin is not installed." #endif
The plugin on startup checks where it's on disk and what plugin files are in the same folder. Than the plugin provides the constants as part of our MBS module. If the plugin files are not found, we don't provide constants.

Of course this is just a solution for our plugins. It would eb nice if Xojo someday defines an #ifdef command or a defined() function. See feedback cases 986 and 9018.
06 09 16 - 15:34