Using Brushfire

Back To Table of Contents

Assumptions

Using Brushfire (Macintosh)

Using Brushfire (Windows)

Common Sense

Overview

Creating Script Output Files (Macintosh)

Creating Script Output Files (Windows)

Start Brushfire (Macintosh)

Preprocessor Steps (Macintosh)

Start Brushfire (Windows)

Preprocessor Steps (Windows)

Select Report Options

Enter Search Terms

Brushfire Report

Errors and Warnings Reports
Search Results

Conclusion

The Brushfire system consists of a FileMaker database for configuration, our custom Brushfire Engine (programmed in C++ for speed), and, for the Macintosh, a template file to facilitate generation of script text files.

Script Text Files
(in the Brushfire Script Output Folder)

The Brushfire Engine operates by reading text files, containing FileMaker script information, from the Brushfire Script Output Folder. (The name of this folder is a little misleading - the files are output by FileMaker, not by the Brushfire Engine.) These script text files are similar, but not identical, on the Mac and on Windows.

On the Mac, the shareware program Print2Pict is used to generate the script text files. On Windows, a feature called a Generic/Text printer driver is used directly by the Brushfire Preprocessor to generate the script text files.

Assumptions

  • Make sure that, on the Mac, Print2Pict is correctly installed, or on Windows, the Generic/Text printer driver is properly configured. If in doubt, or to double check, click on:

    1. Quick Install (for Developers and other experts, and for Windows users)

    2. Installation (For Non-Developers or those not familiar with the MAC OS or Print2Pict )

  • Confirm that Brushfire is correctly installed.

Using Brushfire on the Mac

Using Brushfire consists of the following seven major steps:

  1. Install Brushfire - see Quick Install and/or Installation (generally, this only has to be done once)

    Start the Brushfire PreProcessor

  2. Create Print2Pict Script Output files (script text files) from your Database files.

  3. Enter Data (parameters to identify your FileMaker solution, and this particular Brushfire analysis and report)

  4. Select the folder containing your script (text) output files

  5. Verify that all the files in your solution, which you wish to analyze, are open

  6. Set Report Options and Search Terms

  7. Perform the Brushfire Analysis.

    Use the Brushfire Report to better understand how your scripts are interconnected, and work.

 In later sections of the User Guide, each of these steps will be explained.

Using Brushfire on Windows

Using Brushfire consists of the following seven major steps:

  1. Install Brushfire - see Quick Install and/or Installation (generally, this only has to be done once)

    Start the Brushfire PreProcessor

  2. Verify that all the files in your solution, which you wish to analyze, are open

  3. Create Script Output files (script text files) from your Database files

  4. Confirm the folder containing your script (text) output files

  5. Enter Data (parameters to identify your FileMaker solution, and this particular Brushfire analysis and report)

  6. Set Report Options and Search Terms

  7. Perform the Brushfire Analysis.

    Use the Brushfire Report to better understand how your scripts are interconnected, and work.

 In later sections of the User Guide, each of these steps will be explained.

Common Sense

We suggest you start with a simple solution first, instead of your most complex. Once you have successfully created your first Brushfire report, you will have a better "feel" of how to work with larger solutions.

ALWAYS backup the solution you plan to analyze. Next, work with that backup. If you do not have a backup, then from your solution, create a Stuffit or Zip archive first. (Generating script text files from a solution that has missing files can permanently damage the solution!)

Overview

Using Brushfire is easy:

  • Export Script(s): Script text information from the files of a solution is used for the analysis.

  • PreProcessor A custom FileMaker Pro solution is used to easily configure the Brushfire report.

  • Push Pushing a few buttons quickly gathers non-script information from your FileMaker Pro solution.

  • Perform Brushfire Analysis Performs the analysis, and writes the report to the Brushfire directory.

  • Open and Read Open your Brushfire report and get back to work improving your solution!

Creating Script Output Files (Macintosh)

The goal of this step is to obtain one Print2Pict output file for each FileMaker Pro file in the solution to be analyzed. If Print2Pict files are missing, the analysis will be incomplete.

If Print2Pict is not already installed and configured, please refer to the Quick Install or Installation sections of this User Guide for detailed instructions.

Make sure Print2Pict is the current Chooser Device. If uncertain, go to the Apple Menu, select Chooser, verify that Print2Pict is available and highlighted. If Print2Pict is not seen in the Chooser list (on the left side of the Dialog Box), then it will need to be installed. When the Print2Pict is seen in the Chooser list, select it by clicking on the Print2Pict icon.

After selecting Print2Pict in the Chooser, you need to specify the folder to receive your script output text. From the File menu, choose Page Setup, then click the Options button. When the Options window opens, click on the Folder icon in the left-hand panel, then click on the Select and navigate to the Brushfire Script Output folder.

NOTE: There are two ways to generate script text output files: either manually, or by use of the Brushfire Output Template in the Brushfire Extras folder. The Output Template takes more time to set up, but can save you an enormous amount of time and aggravation in the long run, especially if you want to do repeated analyses of the same solution. We will begin with the manual method, which is easier to understand. Use of the Brushfire Output Template is described on the main layout when that file is opened.

From each FileMaker file in the solution, Print All Scripts by selecting PRINT from the FILE menu, then select Scripts - All Scripts from the Print Dialog. Make sure the Print2Pict Disposition is set as: PRINT TO TEXT. Verify the Print2Pict Options are the same as those originallly configured while using the Quick Install or Installation section.

After printing all scripts from the first file, check for a file on disk in the Brushfire Script Output folder, or the folder you set for Print2Pict to save the output files. Verify there is only one file in the Print2Pict folder.

If there is more than one file in the Brushfire Script Output folder, then the Print2Pict disposition may not have been changed to PRINT TO TEXT or records may have been printed rather than scripts. Additionally, files from a previous Analysis may not have been moved or deleted. Delete all Print2Pict output files, then try the printing again.

As a double check, open one of the Print2Pict files with a text editor, such as SimpleText or BBEdit, and verify that the files are in text format and contain script listing data.

After the Print2Pict output file has been successfully created, then continue to create a Print2Pict output file for each file in the solution. When done, double check that the number of Print2Pict output files corresponds to the number of files in the solution.

  

Creating Script Output Files (Windows)

The goal of this step is to obtain one script text file for each FileMaker Pro file in the solution to be analyzed. If script text files are missing, the analysis will be incomplete.

If the Generic/Text printer driver is not already installed and configured, please refer to the Quick Install section of this User Guide for detailed instructions.

Make sure that all the files that you wish to analyze are open. Then click on the Print Scripts button. DO NOT interfere with the preprocessor while it is generating the script text output files.

Once you have generated a set of script text output files for your solution, you may re-use them as long as they are useful, and skip step (3) on the preprocessor screen. For instance, you might want to generate several reports, each with a different choice of Report Options or Search Terms.

Of course, if you make changes to your solution, you will want to generate new script text output files.

   

Start Brushfire (Macintosh)

After the script text output files are generated, open:

Your Hard Drive:Brushfire:Start Brushfire.fp5 .

The following
Brushfire Preprocessor screen appears.

 

Click Image To Enlarge

Preprocessor Steps (Macintosh)

Using Brushfire consists of the following seven major steps:

  1. Install Brushfire - see Quick Install and/or Installation if this has not already been done

  2. Create Print2Pict Script Output files (script text files) from your Database files. Refer to Creating Script Output Files (Macintosh) if this has not already been done.

  3. Enter Data (parameters to identify your FileMaker solution, and this particular Brushfire analysis and report). Note that every report must have a unique name. If you try to re-use a report name, the pre-processer will create a new one for you.

  4. Select the folder containing your script (text) output files. Normally this will be the Brushfire Script Output folder, inside your Brushfire folder, but you may choose a different folder if you wish. The important thing is to verify that the path name displayed is actually the path to the folder containing your script text.

  5. Verify that all the files in your solution, which you wish to analyze, are open. If you wish, you may open or close some files, then return to this screen and click on the Rebuild List button to verify your file selection. You should have a script text output file for each file you wish to analyze. If you do not, Brushfire will generate an error message, and proceed to analyze the other files in your solution.

  6. Set Report Options and Search Terms. (This step is explained further below.)

  7. Perform the Brushfire Analysis.

    Click on the Perform Brushfire Analysis button. This will cause the preprocessor to generate a directory (folder) structure for the Brushfire Report, and then start the Brushfire Engine.

    Most Filemaker solutions are processed in less than one minute. Large multi-file solutions containing thousands of scripts may take a few minutes. For example, a 28 file solution with about 3500 scripts took 2-1/2 minutes on a G4 400Mhz system.

    The Brushfire log window will open and display detailed information regarding the analysis. The files being read are displayed, along with any errors encountered during the run. These errors will include: improper script text output file format, missing files, and associated errors.

    When processing is complete a dialog box appears asking if you wish to save the log. It is recommended that the log be saved. (The log can be very helpful in diagnosing any problems that may occur.)

    You can then view the report by clicking on the html icon on the preprocessor screen. When you are finished viewing the report, click on the "Done" button to return to the main screen.

    You can revisit a Brushfire Report at any time in the future by finding its folder inside the Brushfire Reports folder, and double-clicking on the index.html icon.

Start Brushfire (Windows)

Open:

Your Hard Drive:Brushfire:Start Brushfire.fp5 .

The following
Brushfire Preprocessor screen appears.

 

Click Image To Enlarge

Preprocessor Steps (Windows)

The Brushfire Preprocessor steps on Windows are essentially the same as on the Macintosh, but are performed in a different order. The most important difference is that the Brushfire Preprocessor generates the script text output files directly, rather than requiring the user to generate them as a separate step.

Select Report Options

When you click on the Select Options button on the preprocessor screen, the following Select Brushfire Report Options screen appears.

 

Click Image To Enlarge

Brushfire can generate up to ten Errors and Warnings reports. You can decide which reports you want by clicking on the appropriate check boxes. The buttons All and None are provided for convenience in checking or unchecking all options. Click on Continue to return to the main screen.

Some notes on the options:

  • Script Errors - All FileMaker script steps (not just Perform Script) which contain:
    • <unknown>
    • <File Missing>
    • <Field Missing>
    • <Relationship Missing>
  • Missing Files - these might better be termed "temporarily absent files." All files in a solution must be present when the script text files are generated, or else scripts that reference non-existent files will be damaged irreparably.

    Once you've generated all your script text files, however, you may choose to analyze only part of your solution. Files that are not present in the analysis, but are referenced by files that are present, will be shown in the "Missing Files" list.

  • Embedded IP Addresses - IP's of the form: (1.2.3.4)

    These addresses from your hosted FileMaker Pro files may get embedded in your FileMaker script code during the development process, or on deployment, If you change FileMaker Servers, or have to change the IP address of your FileMaker Server, then you will probably want to detect and remove or modify the embedded IP addresses.

  • Halt - shows Halt Script or Allow User Abort statements

  • Layout Dependencies - shows all script statements that require a particular layout. Includes Cut, Copy, Paste, Clear, Insert, Relookup , Replace, Select All.

  • Delete - shows scripts that delete one or more records.

  • Macintosh Code - shows script steps that are Macintosh-dependent, such as Perform Applescript, etc.

  • Windows Code - shows script steps that are Windows-dependent, such as Send Message, etc.

  • SQL Code - shows script steps using Execute SQL

  • Empty String Test - shows scripts containing tests such as

       textfield = ""

    which may require updating to IsEmpty( textfield )

Enter Search Terms

When you click on the Enter Search Terms button on the preprocessor screen, the following Enter Search Terms screen appears.

 

Click Image To Enlarge

Brushfire can search for up to fifteen strings in script names, script steps, or comments. In case you don't want to search comments, a Search Comments check box provides an option that can be toggled on or off.

Search terms must be filled in from the top of the list - no "holes" are allowed in the list. Also, searching is case-sensitive, so enter both capitalized and lower case versions if you want to catch all occurrences. (Searches do not distinguish between whole words and parts of words, so a search for "mary" will also turn up "primary".)

Click on Continue to return to the main screen.

Brushfire Report

The Brushfire report can be opened, either by clicking on the icon in the Brushfire PreProcessor or the index.html file in the Brushfire Report folder.


When first opened, the File Panel is visable on the left. This consists of a list of all files in the Filemaker solution, a link to the error report and summary information about the script analysis.

(A "Welcome" screen has been added to fill in the blank space next to the Files panel.)



Click Image To Enlarge

Clicking on a filename displays an overview of that file. The middle panel displays the Script List and the right panel contains the Script Layout List for that file.

Click Image To Enlarge

The Script Layout List shows which script performs a GoTo Layout step that references a layout. Note that a GoTo Layout by number or field reference is not reflected in this list.

The Script List displays a count of errors, calls to and from the ScriptMaker Order ID and the script name. The Script List may be sorted by clicking on the applicable header.

Clicking on the Script ID Number link will "drill down" to show the script detail and crossreference information.

Click Image To Enlarge

The Script Overview consists of script details and script crossreference information.

The Script Cross Reference panel on the right consists of two sections: Cross Reference and Call Sequence.

Script Cross Reference shows a list of all scripts that call the selected script.

Call Sequence Chain will show the complete subscript hierachy called by this script.

The Script Detail Panel displays the complete script text of the selected script and each associated subscript.

There are two different types of links in the Script Detail and the Call Sequence. The first is a link on the script number, the second a link on the script name. The script number link, when clicked changes the display focus to show script overview information.

Clicking on a script name scrolls the middle panel to the selected script.  Note that the scrolling function appears to scroll, only if the script detail exceeds the panel size.

Each panel in a Brushfire Report may be opened in a new browser and enlarged to fill the entire monitor. This is accomplished by moving the mouse to the panel and holding the mouse button down until a menu appears. Next, as shown below, select the Open Frame In New Window menu item to create a new browser window. If desired, the contents of this new window may be printed.

Click Image To Enlarge

Below is an example of an expanded frame in a new window:

 

Note: you are only limited by RAM and monitor size as to how many windows can be open at the same time.

Errors and Warnings Reports
Search Results

Near the bottom of the left-most, or "files" panel are two areas labeled Errors and Warnings and String Search Results. These sections reflect the choices you made during preprocessing, and indicate the number of each type of error/warning or search term detected.

To view the results of the search, click on the name of the error/warning or search report you want to view. In the scripts (center) panel, you will see a list of the files, scripts, and script statements containing the requested error/warning or search string. Click on the script number to view the script.

(The capabilities of Brushfire have been expanded since this screen shot was taken, but the general structure remains the same.)

Click Image To Enlarge 

 Conclusion

The above steps from the Create Script Output Files section to Conclusion are used for any script analysis.

Copyright © 2001, 2002 Chaparral Software & Consulting Services, Inc.
 

Previous (Installation) | Next (Support )
Go To
Table of Contents

Revision 5 February 8, 2002