Development Guide

Table Of Contents
40 FileMaker Pro Advanced Development Guide
11. Double-click an external function to add it to the formula box.
All external function calls require the name of the external function to call and the function’s parameter
value, even if the value is null.
12. Replace the parameter placeholder with the required parameter or parameters for the function.
13. Continue to build the formula then and click OK when you’re done.
14. Click OK to close the Manage Database dialog box.
Mac OS Plug-ins created for PowerPCs need to be re-compiled as universal binaries to be able to run
natively when FileMaker Pro is run on Intel-based Macintosh computers. Universal binaries allow
applications to run natively on both PowerPC and Intel-based Macintosh computers.
To compile the FMExample or your custom plug-ins on Mac OS X, perform a custom installation of Xcode
and select the option “Cross-Development.
Customizing the plug-in example
The plug-in example in FileMaker Pro Advanced is designed to be easily modified so you can add your own
custom functions. You need to modify the following items:
1 version information in FMPluginExample.strings and FMPluginExample.rc
1 plug-in and function names in FMPluginExample.strings and FMPluginExample.rc
1 configuration function in FMPluginPrefs.cpp
1 external function definitions and coding in FMPluginFunctions.cpp
Customizing the example resources
You must make the following modifications to the plug-in resource files to create a custom external function
plug-in:
1 Modify the version variables and strings to meet your needs.
1 Revise the configuration dialog box to meet your needs.
1 Specify the correct option string values.
1 Edit plug-in names and description.
1 Define your function names and function prototypes.
Customizing FMPluginExample.cpp
Make your modifications to the FMPluginExample.cpp in the functions listed in the following table.
Function name Customization
Do_PluginInit Provide your own unique plug-in ID for “pluginID.” Register each function, providing its
name, description, and function to be used. Call fmx::ExprEnv::RegisterExternalFunction
to register your functions.
Do_PluginIdle Add any idle processing your plug-in needs.
Do_PluginShutdown Revise the UnRegisterExternalFunction calls to reverse the registration done in
Do_PlugInit. Call fmx::ExprEnv::UnRegisterExternalFunction to unregister your functions.