Developer Utilities

The Tools images/U2192.jpg border=0> Developer Utilities command looks so insignificant and benign to the unsuspecting person, but behind it lurks a vast array of powerful features. There are developer utilities for all of the following techniques:

  • Rename one file in a system of interconnected files, and have every file reference in the other files automatically update to the new name.
  • Turn your database into a kiosk system. You can use this feature to make interactive programs that run on publicly accessible computers. In this setup, FileMaker hides the menu bars, the Windows taskbar or Macintosh Dock, and every other screen decoration that's not a part of your layouts.
  • Create a runtime solutiona special version of your database that anyone can use, even if they don't have FileMaker Pro.
  • Permanently remove full access to files so you can send your database to people you don't know, and be sure they can't tamper with your hard work, including your scripts, table and field definitions, and relationship graph.
  • Create an error log to help you troubleshoot problems that occur when FileMaker generates runtimes.

In fact, you can (and often want to) do several of these things at once. Here's an example: You build a beautiful interactive product catalog, complete with pictures and an easy-to-use ordering screen. You then want to set up a kiosk computer at a trade show where attendees can use the database to see what you have and place their orders. Using the developer utilities, you could do all this:

  • Add "Kiosk" to the end of every file name, so you can keep this copy separate from the one you use in the office.
  • Make the database run in Kiosk mode so users at the trade show won't be able to exit FileMaker, switch to other programs, or otherwise cause mischief.
  • Make the whole thing run by itself so you don't have to bother installing FileMaker on the computer you're renting just for this job.
  • Lock out full access so if someone manages to steal a copy of your database while you're not looking, they can't see how it works or steal your product's beauty shots.

19.7.1. Using the Developer Utilities

The most confusing thing about the developer utilities is that you have to close your files before you work with themjust the opposite of every other command in FileMaker. So close the files you want to modify, and then choose File images/U2192.jpg border=0> Developer Utilities. You behold the Developer Utilities dialog box (Figure 19-14).

Figure 19-14. The Developer Utilities window (File Developer Utilities) lets you gather the files you want to change, and then tell FileMaker what changes to make. When youre done, you click Create, and FileMaker builds new versions of your files (in a new location) with all the changes in place.

In the Developer Utilities window, you first choose which files you want to work with. Click Add to put a file on the list. In Mac OS X, you can select several files at once in the Open File dialog box using your Shift and keystrokes. Alas, in Windows, you have to pick just one file, and then click Add again to add the next one. Keep on adding until every file you want to change is in the list. If you accidentally add the wrong file, select it and click Remove.

You have to pick one file to be your main file. This file is the one that opens first if you create a runtime solution, for example. To set the main file, just double-click it in the list. FileMaker shows a red squareit looks surprisingly like a script break-pointby the main file.

19.7.1.1. Renaming files

Of course, you can always rename a file in Window Explorer or the Mac's Finder. But those interfaces let you change only the file name. Developer Utilities makes that look like child's play. When it changes a file name, it also looks inside the file and updates any internal file references to match the file's new name. If you've ever tried to open two versions of a multiple file solution at the same time (to test some scripts that delete data and on a copy of the files, say), you know that FileMaker sometimes gets confused and keeps multiple copies open even after you try to close one set. You can eliminate the crossover problem by renaming one set in Developer Utilities. You can test your scripts without a problem, since the scripts in the copy files automatically inherit the correct new file names.

To rename a file or set of files, add them to the Solution File list (Figure 19-14). Select a file, type the new name in the "Rename file" box, and then click Change. FileMaker shows the new name in the New Name column.

Next, you need to pick the project folder. This folder is the one where FileMaker saves the finished files. Just click the Specify button under "Project Folder" and pick any folder you wish. If the folder already contains files with the same names as the ones you're about to create, you get an error messageunless you turn on "Overwrite matching files within the Project Folder." When you click Create, FileMaker Advanced makes copies of the files with their new names, leaving the originals untouched.

To complete the example above (your kiosk product catalog), you would turn on "Create Runtime solution application(s)," "Remove admin access from files permanently," and "Enable Kiosk mode for non-admin accounts." Only the first option needs to be configured.

19.7.1.2. Create Runtime Solution application(s)

To create Runtime Solutions, add the files to the Solution Files list, and then select a project folder, just as you did above. Don't type a new name for the Runtime in this window, though. Click the Specify button under Solution Options. You see the Specify Solution Options dialog box, as shown in Figure 19-15.

When you tell FileMaker you want to build a runtime solution, it generates a special program that you need to include with your databases. This program can do most of what FileMaker Pro can do, but it can't modify tables, fields, layouts, or scripts. You get to decide what this program is calledjust type it in the Runtime Name box. Along with the runtime program, FileMaker creates new copies of each of your files to go with it, and changes all the file name extensions to something other than .fp7. Tell FileMaker what extension to use in the Extension field.


Warning: Your computer's operating system uses file name extensions to figure out which program files belong to. The Developer Utilities let you assign any extension you want, but you should avoid common extensions like .doc, .jpg, .mp3, and so on. You know computersthey get confused easily.


The new files don't just have a new name; they are also modified internally so they're bound to the runtime program, and the runtime program in turn can open only properly bound files. In other words, when you send people a runtime program, they can't use it to open any old FileMaker Pro file.

Figure 19-15. The Specify Solution Options window lets you tell FileMaker what you want done to the files. Turn on a checkbox in the Options list to tell FileMaker you want that thing done to your files. Most options need to be configured, and when you select an item in the list, the bottom half of the window lets you change the appropriate settings.

To facilitate the binding process, FileMaker asks you to provide a bindkey. FileMaker stores this value in both the runtime program and any database files in the Developer Utilities window. The value you use for the bindkey is entirely unimportant, and there's no need to keep it secret. But if you later want to bind new databases to the same runtime program, you'll have to use the same bindkey.

Finally, when users exit the runtime program (in other words, when they close your database system), they see a "Made with FileMaker" splash screen. Normally, this screen looks like the one in Figure 19-16. You can also control how long the splash screen shows by putting the number of seconds in the Delay box. Unfortunately, you can't make it go away entirely.

19.7.1.3. Remove admin access from files permanently

The "Remove admin access from files permanently" option doesn't actually remove the accounts that have full access. Instead, it modifies the [Full Access] privilege set so that it no longer truly has full access. If you log in with an account that normally has full access, it doesn't have access to the Define Database window, Layout mode, or ScriptMaker, and its access to Accounts & Privileges is limited to the Extended Privileges tab. This option has no settings.

Figure 19-16. When you quit a runtime solution, this window pops up for a few seconds. You can't get rid of the "Made with FileMaker" logo, but you can change the big FileMaker graphic to anything you want. Just turn on "Custom image" and pick a picture file from your hard drive. FileMaker stretches the picture to fit in the window, so to avoid distortion, you should create a picture that is exactly 382 pixels wide and 175 pixels high.

 

19.7.1.4. Enable Kiosk mode for non-admin accounts

If you turn on Kiosk mode and then open the new file using an account that has full access, you don't see any changes. But if you log in with a lesser account, everything changes. The screen goes completely black, except for the content area of your database window. You can see an example in Figure 19-17.

Figure 19-17. When you open a database in Kiosk mode (with an account that doesn't have full access) it looks like this. Everything on the screen is completely black outside your layout. You can still switch layouts and otherwise interact with your database, but you can't make new windows, resize the window, exit FileMaker, or switch to other programs. You also can't print, enter Find mode, or otherwise use FileMaker's features unless buttons on the layout let you.

When you use Kiosk mode, you typically hide the status area and let people control everything from buttons on layouts. Alternatively, you can use custom menus (Section 19.5.3) to hide all the menus and commands that would let nosy people poke around in your file. Remember to troubleshoot your file before creating a custom runtime from it, because any problems in your file (broken links, missing data, bad scripts) also show up in the runtime. But once you've suppressed all the normal FileMaker commands, folks have no way of getting around these problems.

19.7.1.5. Databases must have a FileMaker file extension

Sometimes people, Mac types especially, create databases without the .fp7 file extension, only to regret that decision later. An extension is computers' most accurate way to identify a file. So turn on "Database must have a FileMaker file extension," and FileMaker adds ".fp7" to the end of every file name that doesn't already have it.

19.7.1.6. Create error log for any processing errors

While FileMaker processes your files, applying your options, building runtime programs, or renaming files, it might encounter problems. Turn on "Create error log for any processing errors" so you can see what went wrong. FileMaker saves error messages in a file on your hard drive (you get to pick where it goes and what it's called).

19.7.1.7. Loading and saving settings

If you maintain a database system that other people use, you may well run your files through developer utilities every time you send out a new version. To save you the tedium of configuring the Database Utilities dialog box again and again, FileMaker lets you save all your settings to a special filejust click Save Settings. Later, when you're ready to process your files again, click Load Settings and select the same file. FileMaker sets up everything in the dialog box for you. All you have to do is click Create.

19.7.2. Delivering a Runtime Solution

If you build a runtime solution with FileMaker Advanced in Mac OS X, it runs only in Mac OS X. Likewise, if you build from Windows, your runtime solution is limited to Windows. If you need a runtime solution for both platforms, you must buy FileMaker Advanced for Mac OS X and for Windows and build a separate runtime solution on each kind of computer.

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