Development Guide
Table Of Contents
- Chapter 1 Introducing FileMaker Pro Advanced
- Chapter 2 Creating database solutions
- Chapter 3 Customizing database solutions
- Chapter 4 Debugging and analyzing files
- Chapter 5 Developing third-party FileMaker plug-ins
- About external functions
- About the example plug-in
- Installing, enabling, and configuring the example plug-in
- Description of the FMExample plug-in’s external functions
- Using the example plug-in
- Customizing the plug-in example
- Requirements for writing external function plug-ins
- FileMaker messages sent to the plug-in
- Avoiding potential Mac OS X resource conflicts
- Providing documentation for your plug-in
- Appendix A Feature comparison of the runtime application with FileMaker Pro
- Index
Chapter 5
|
Developing third-party FileMaker plug-ins 41
Customizing FMPluginPrefs.cpp
This file contains the Do_PluginPrefs function for the implementation of the configuration dialog box.
Revise or remove this code as needed.
Customizing FMPluginFunctions.cpp
Revise or remove the functions provided in the FMPluginFunctions.cpp file and define your own.
Do_PluginInit refers to these functions when evaluating external functions in calculations.
Requirements for writing external function plug-ins
FileMaker plug-ins are most useful when they contain a single function or a set of functions with similar
features. When you design your plug-in, keep in mind that developers who use your plug-in may not
understand programming conventions that you take for granted. The format of each function’s parameter
should be understandable to the typical user.
If you are creating a FileMaker plug-in with functions that do not require any parameters, make sure the
function “prototype” registered for that function does not include parentheses. For example, “DoThis”
should be registered instead of “DoThis( )” as the function prototype.
API code files
There are ten API code files in the Headers folder: FMXExtern.h, FMXCalcEngine.h, FMXBinaryData.h,
FMXDateTime.h, FMXTextStyle.h FMXTypes.h, FMXFixPt.h, FMXClient.h, FMXText.h, and
FMXData.h. The files are not redistributable in source code (or human readable) form, cannot be modified,
and are only provided to enable licensees of FileMaker
Pro Advanced to compile plug-ins for use with
FileMaker products. Not all the files are required to build all types of plug-ins.
The FMXExtern.h is absolutely required. The FMXExtern.h defines the parameter block (the shared data
structure used by your plug-in and FileMaker
Pro, FileMaker Pro Advanced, or FileMaker Server) and some
shared function calls. The function calls are used to manipulate the parameter and result handles in the
parameter block.
The FMXExtern.h file defines the call-back functions for backward compatibility operations and the
different kinds of plug-in events (FileMaker
Pro, FileMaker Pro Advanced, or FileMaker Server messages)
sent to the plug-in in a FMExternCallSwitch definition.
FMExternCallStruct defines the structure of the parameter block. FMExternCallPtr is a pointer to that
structure and gFMExternCallPtr is a global variable that should be defined in your code.
The FMXCalcEngine.h file contains the register and unregister functions. It will be used in most plug-ins,
as the plug-ins will likely need to register functions.
The functionality of the remaining API code files is described in comments that are included in the files
themselves.