Developer’s Guide

Table Of Contents
Developing third-party FileMaker plug-ins 65
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.
Option string syntax
The option string must be 11 characters long for plug-ins.
The first four characters of the option string are the ID of the plug-
in. The ID must be unique for each plug-in and must not begin with
F,” “FM,” or “Web.” For the Mac OS X, it is recommended that you
set the creator type of the plug-in to this same value. The ID can only
contain low-ASCII alphanumeric characters (such as
0-9, A-Z,
and a-z).
Note So that there will be a good chance of having a unique ID, you
should register the ID at the Apple Developer Support web site, even
if you won’t be creating a Mac OS X version of your plug-in. To
register plug-in IDs as Creator codes, go to the developer support
pages on the Apple Computer web site at www.apple.com/
developer. For more information, see
“Registering your plug-in” on
page 68.
The fifth character of the option string is always “1” and the eight,
tenth, and eleventh are always “n.” Other values for these flags are
reserved for FileMaker use only.
For example, “Moc31YnnYnn” is a option string for a plug-in with the
ID of “Moc3” (characters 1-4) that requires configuration (character
6 = “Y”), uses the new style registration and functions callbacks
(character 7 = “n”), and requires special idle time
(characters 9 = “Y”).
Table of option string characters
Naming conventions for external functions
The function name prefix for all of the plug-in’s external functions
must be a unique value containing four or five characters and must
not begin with the characters “
FM” or “Web.” Four-character prefixes
are reserved by FileMaker. For example, the FMPluginExample
plug-in’s function name prefix is “XMpl.”
FileMaker will manage the naming conventions for plug-in name,
filename, and function prefix. For this reason, you need to register
Characters
in the option
string Description of characters
1-4 Characters 1-4 are the plug-in ID. Register the ID as a Creator
code on the Apple Developer Support web site at
www.apple.com/developer.
5 Character 5 is always “1.”
6 Set the sixth character of the option string to “Y” if you want to
enable the Configure button for plug-ins in the Preferences
dialog box. Use “n” if there is no plug-in configuration needed.
If the flag is set to “Y,” then make sure to handle the
kFMXT_DoAppPreferences message. For more information,
see “FileMaker messages sent to the plug-in” on page 66.
7 Set to “n” for the new style plug-in registration and function
callbacks demonstrated in the FMExample. Only set to “Y” if
your plug-in requires the legacy function string list and single
external callback.
8 Character 8 is always “n.”
9 Set the ninth character of the option string to “Y” if the
kFMXT_Idle message is required. For simple external functions
this may not be needed and can be turned off by setting the
character to “n.”
10 Character 10 is always “n.”
11 Character 11 is always “n.”