Developer’s Guide

Table Of Contents
12-8 Developer’s Guide
The second string (ID 129)is the descriptive text displayed in the
Application Preferences dialog box when the plug-in is selected.
The third string (ID 130) must be empty.
The fourth string (ID 131), referred to as the feature string,
contains the plug-in’s unique ID and feature flags.
//////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
128 “FMExample” /* Name of plugin as shown in calculation
dialog */
129 “This is an example plug-in that demonstrates how to
write plug-ins. This comes with FileMaker Developer.” /* De-
scription shown in application preferences panel in FileMaker
*/
131 “Xmpl1YYYYnY” /* “Feature String” = <4 char creator>
<always 1> <app prefs> <has external functions> <always Y>
<idle> <always n> <Win32s> */
144 “Xpl-Version” /* functionId 0 */
145 “Xpl-NumToChar” /* functionId 1 */
146 “Xpl-CharToNum” /* functionId 2 */
147 “Xpl-Format” /* functionId 3 */
148 “Xpl-NumWords” /* functionId 4 */
/* INSERT YOUR CODE HERE */
// 149 “Xpl-MyNewFunctionNameHere” /* functionId 8 */
kErrorMsg “FMExample Plugin Error”
kErrorBody “error %li”
kStrMsg “FMExample Plugin”
kStrBody “%s”
END
///////////////////////////////////////////////////////////
//////////////////
String table in FMExample.rc
resource ‘STR#’ (kFMEX_RES_STRINFOID, purgeable) {
{ /* array StringArray: 4 elements */
/* [1] */
/* Name of plugin as shown in calculation dialog */
“FMExample”,
/* [2] */
/* Description shown in application preferences
panel in FileMaker */
“This is an example plug-in that demonstrates how
to write plug-ins. This comes with FileMaker
Developer.”,
/* [3] */
““,
/* [4] */
/* “Feature String” = <4 char creator> <always 1>
<app prefs> <has external functions> <always Y>
<idle> <always n> <Win32s> */
“Xmpl1YYYYnY”
}
}; /* STR# kFMEX_RES_STRINFOID */
String table in FMExample.r
Feature string syntax
The feature string must be 11 characters long for FileMaker Pro
plug-ins.
The first four characters of the feature string are the ID of the
FileMaker Pro plug-in. The ID must be unique for each plug-in and
must not begin with “F,” “FM,” or “Web.” For the Mac OS, 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 version of your plug-in. To
register plug-in IDs, go to the developer support pages on the Apple
Computer web site at www.apple.com/developer/ (see
“Registering
your plug-ins” on page 12-13).