Plug-ins

Some things just can't be done (or can't be done well) using calculations and custom functions. When you run into this situation, you may consider looking into plug-ins, which are tiny applications that live inside FileMaker to help it do some specific task that it can't do on its own.

Many plug-ins focus on doing certain things: process a credit card transaction; create charts; perform certain jobs based on a schedule; or interact with special devices like cameras, barcode readers and so on. Although plug-ins work through calculation functions, scripts, which the next section covers, generally control them.

Some plug-ins, though, are perfect candidates for calculations. Plug-ins can convert, resize, and otherwise modify images in container fields; or perform complex mathematical, scientific, or financial calculations that would be difficult or inefficient in a calculation. Although this book doesn't cover any specific plug-ins, this section shows you how to access the functions any plug-in you install provides.

12.2.1. Installing Plug-ins

A plug-in comes in a file bearing a special FileMaker Plug-in icon (shown in Figure 12-4). In order to use plug-ins, FileMaker needs to load them (that is, it has to put the plug-in code into its own memory). Every time you launch the program, it searches for plug-ins in a folder called Extensions inside its own folder, and loads all that it finds.

Figure 12-4. FileMaker plug-ins come in many varietieswith many namesbut they all look like this. (Some plug-ins have a '.FMX" filename extension, some have '.FMPLUGIN," and some have no extension at all.) Your job is to put the file where FileMaker can find it.

Installing a plug-in is thus a simple matter of making sure it's in the right folder:

  • On Windows, it's typically C: Program Files images/U2192.jpg border=0> FileMaker images/U2192.jpg border=0> FileMaker Pro 8 images/U2192.jpg border=0> Extensions.
  • images/U2192.jpg border=0> FileMaker Pro 8 images/U2192.jpg border=0> Extensions.

Note: If you're using FileMaker Pro Advanced, the FileMaker folder is called FileMaker Pro 8 Advanced, not FileMaker Pro 8.


Once you've found the folder, just drag the plug-in file into it and restart FileMaker. You won't see anything on your screen to let you know it worked. To see which plug-ins FileMaker has actually loaded, you need to visit the application preferences (FileMaker Pro images/U2192.jpg border=0> Preferences on Mac OS X, Edit images/U2192.jpg border=0> Preferences on Windows). In the Preferences window, click the Plug-ins tab, or look to Figure 12-5.

Once you've installed plug-ins, you can use their functions from the External functions section of the list in the Specify Calculation dialog box (Section 9.2). For details on how to use these functions, consult their developer's manuals or Web sites.

Figure 12-5. The Plug-ins tab in FileMaker's Preferences dialog box shows you all the plug-ins you've installed. Disable a plug-in by deselecting the checkbox by its name. If a plug-in requires any configuration, select it in the list and click Configure. When you have a plug-in selected, you see a description of it below the list.

 

12.2.2. Old and New Plug-ins

There are actually two kinds of plug-ins for FileMaker: older FileMaker 4-style plug-ins and newer FileMaker 7/8-style plug-ins. FileMaker 8 works with both types of plug-ins, but it's a good idea to ask your plug-in provider which type you're getting, since the FileMaker 4 plug-ins have limited abilities:

  • The functions provided by FileMaker 4 plug-ins always expect one parameter. Even if the function doesn't need a parameter, you have to pass "", which is just an empty parameter. If the function really needs more, consult the documentation that came with the plug-in to find out how to accommodate it.
  • This single parameter's type is always text in a FileMaker 4 plug-in's function. If you want to pass a date, time, timestamp, or number, you have to convert it to text first, using GetAsText.

FileMaker 7/8 plug-ins give you a lot more options. Functions can have as many parameters as their creator cares to give them. They can also deal with all data types, including pictures, movies, and files stored in container fields.

12.2.3. Finding Plug-ins

Most FileMaker developers lack the know-how to build their own plug-ins. Although you can hire a programmer to make one to your specifications, you can often find one on the market that already does what you want. To help you hunt them down, FileMaker, Inc. has a plug-in registry on its Web site. Just visit www.filemaker.com/plugins/index.html to access the site.

You can also visit the more prolific FileMaker plug-in vendors' Web sites:

  • 24U Software; www.24usoftware.com
  • New Millennium Communications; www.nmci.com
  • Troi Automatisering; www.troi.com
  • Waves in Motion; www.wmotion.com

New vendors come up with great products all the time. Use your favorite search engine or try FileMaker's Web site for new plug-ins:

http://www.filemaker.com/plugins/all.html

12.2.4. Creating Your Own Plug-ins

If you're feeling adventurous (or have helpful programmer friends), you can create your own plug-ins. To do that, you first need FileMaker Advanced (it's the only version of FileMaker that includes the Plug-in Software Development Kit or SDK). You also need a C++ development environment. In Windows, you're best off with Visual C++ or Visual Studio.NET. On Mac OS X, you can use CodeWarrior (www.codewarrior.com) or XCode (included with Mac OS X 10.3). The Plug-in SDK includes sample projects for each of these environmentsand sample plug-in codeto get you started.

Part I: Introduction to FileMaker Pro

Your First Database

Organizing and Editing Records

Building a New Database

Part II: Layout Basics

Layout Basics

Creating Layouts

Advanced Layouts and Reports

Part III: Multiple Tables and Relationships

Multiple Tables and Relationships

Advanced Relationship Techniques

Part IV: Calculations

Introduction to Calculations

Calculations and Data Types

Advanced Calculations

Extending Calculations

Part V: Scripting

Scripting Basics

Script Steps

Advanced Scripting

Part VI: Security and Integration

Security

Exporting and Importing

Sharing Your Database

Developer Utilities

Part VII: Appendixes

Appendix A. Getting Help



FileMaker Pro 8. The Missing Manual
FileMaker Pro 8: The Missing Manual
ISBN: 0596005792
EAN: 2147483647
Year: 2004
Pages: 176

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net