MBS FileMaker Plugin - Syntax Coloring
We got a nice collage to show you over 15 improvements to the FileMaker Pro user interface included with MBS Plugin for MacOS:
If you like to check if you can name them all, please look on full resolution image: SyntaxColorizing.png
- Option Click for FileMaker Script Workspace
- Custom Function Tools for FileMaker Pro
- Dark Mode in FileMaker
- Hide lines in Data Viewer
- Search shortcut for Script Workspace
- Sort Layouts and Fields in FileMaker
- Font setting for FileMaker Script Workspace and
A font preference for FileMaker and
Using a different font in FileMaker
- Different colors for variables in FileMaker
- Add a search and replace command for FileMaker Script Workspace
- Custom context menu commands for FileMaker ScriptWorkspace
- MBS Plugin shows text position and selection in FileMaker
- Search for variables in data viewer
- See invisible characters in FileMaker calculations
Reasons for FileMaker Pro users on MacOS to install MBS Plugin
Over the years we got a lot of free goodies in the MBS Plugin to improve your daily development experience. Please check those 21 features:
1. Rule based syntax highlighting
The MBS Plugin has a default rule set to color script lines and overwrite the colors from FileMaker itself. This includes the use of red color for lines with errors, orange for warnings and colors to detect the type of lines.
In the screenshot you see Perform Script in red as no script is chosen. You also see Set Field without field specified in orange.
And the best: You can customize the rules with the Syntax Colorizer database included with the plugin. Thanks to Russel to make it.
If you select a line belonging to an if or loop block, we highlight the other lines for the same block in light blue. This way you can easily spot where the end if/loop lines are or where the loop is exited early.
2. Rule based coloring of calculations
When you type calculations, we can apply our rules to color the calculations. This includes rules to give functions a color, brackets a color, numbers a color ad quoted text a color. You can even set colors for local variables and global variables in general and specific variables with specific colors. Some for function names, so you can define a general color for functions and give your special functions an unique color. Than if you misspell a function name, you notice right away.
If you have brackets set incorrectly, we highlight the wrong brackets in red. This is super useful to find where a bracket closing is needed.
3. Search text in Script
For the script workspace, the MBS Plugin adds a control to the title bar to search the texts of the current script. You type something, we update the script view and show all lines in yellow with the matching text.
We can only search the visible text in the window, so if FileMaker doesn't include an option there, it can't be found.
You can reach this text field via keyboard by pressing Command-F key combination.
4. Search text in Tables
For over 30 tables in the FileMaker user interface, you can press command-F key combination with focus on the table to show the find bar. This is a control provided by Apple's frameworks and we enable it to search in the table. You can type a text and move from one occurrence to the next one. The plugin automatically scrolls to the right line and highlights the found cell.
This works fine for fields, tables, custom functions, privileges, layouts and many more tables used in FileMaker user interface.
5. Copy text of scripts
In the script workspace, you can copy the text of a script. This is very useful to paste it into an article for your blog, the FileMaker community or an email.
The text includes styles, so all the colors for the lines are included. If you press alt key, you get html text instead to the clipboard.
6. Search and replace in calculations
Within a calculation window or custom functions window the Command-F shortcut will add the find bar to the text area. You can find text or do a search & replace within your calculation or custom function.
7. Search field for relationship graph
When you open the database definition dialog and go to the tab for relationships, the MBS Plugin adds a combobox to the layout. You can type something, press return and we search the graph for the item matching the name. If needed, you can click on the search box again, press return and continue the search.
The combobox has a popup menu to show all choices you have. If the menu is open and you type in the field, we filter the menu to the items you like to find.
To help search, please name items with unique starting names. If you have Contacts and ContactsPhone, the search to Contacts will find either of them, whatever we find first. But if you name second table PhoneForContacts, you find it easily with phone as search term.
8. Contextual menus
In various places, MBS Plugin adds a context menu. This includes script workspace, where our menu offers the entries from edit menu to copy & paste, the activate/deactivate commands and the possibility to copy the current script to the clipboard as text.
You can click on tables in the FileMaker dialogs and use the context menu to copy the text. Great to get a list of user accounts, a list of fields or layouts.
If the current line calls a script, the plugin may show an entry in the contextual menu to open that script. Our plugin can only open a script in the same workspace. FileMaker itself recently got a similar feature where you can command click on the script name to jump there.
The contextual menu shows for popup controls, too. This allows you to copy the list entries to the clipboard.
9. Zoom text in scripts
When you have the script workspace open, you can use plus and minus buttons on top to zoom into the text. The = button in the middle will zoom to 100%. Plus will zoom in 20% and minus will zoom out 20%. We put in barriers to avoid too much zoom.
The line numbers drawn in script workspace don't follow the zoom, but you can still click before the line to set a breakpoint. It will just not show where you clicked, but still work.
10. Show IDs for scripts, fields and tables.
If requested, the plugin can add a column to script workspace for script IDs. We can show IDs for fields and tables in the interface. In the field list you notice a star in front of numbers to indicate that the IDs are not continuous.
11. Remember column widths for tables, fields, layouts and custom functions
When you have a long name for a field, layout or custom function, you start resizing the columns every time you open the relevant dialogs. But FileMaker resets the column widths every time you change the dialog.
MBS Plugin stores the current setup for column widths when window closes and restores it a millisecond after the window loaded the content.
12. Check variables
If enabled, MBS Plugin can check variable usage in a script. This requires a style where you declare all variables before you use them. For most script steps defining variables, we do detect those automatically. But it may be needed, that you use Set Variable on the beginning of the script to fill all variables you need later with empty values.
For variables defined in Let statements or new script statements we do not recognize, you can use comment lines with @variable, @constant or @parameter on the beginning followed by the variable name. This will be recognized as a valid definition of the variable.
Please avoid spaces in variables as we only check the name before the first space.
If a variable is not found, we show the message in the script workspace in red on the right side of the script window. We can show a notification to you, if you enable notifications for FileMaker in system preferences. You don't need to click away the notifications for missing variables as they will auto disappear after a few seconds.
13. Sort contextual menu for object styles
Recently in version 9.1, the MBS Plugin started to sort the menu options in the object style submenu for FileMaker.
This can be useful if you have > 50 layouts and you are always looking for the styles in the list.
14. Calculation font size
Optionally we can change the font size for calculations. So when you age and it gets harder to read small text, you can ask the plugin to e.g. use 16 points for font size as minimum.
15. Handle ESC key for touch bar
You got a MacBook Pro with a touch bar, you may have noticed that it is very easy to hit the escape key in the toucher accidentally. It annoyed us so much, that we changed the event handling via our plugin. If the option is used, you need to press option key and escape key simultaneously. This avoids accidentally loosing changes to a custom function.
16. Line numbers and GoTo
For earlier FileMaker versions we added line number column to script editor. Since FileMaker got the new Script Workspace with integrated line numbers, we stopped doing this. But still we have a Go To Line box in the title bar, which can be useful to jump to a line.
It's very convenient to tell your coworker to go too line 845 via the box by entering the number instead of scrolling though all the script lines manually.
17. Show field information for export dialog
Recently we added some tooltips for the export dialog. When you have fields in the table on the left or right, you can move the mouse over the field, wait a second and the tooltip should appear. It shows you the type of field, so you know whether it's a global field, a container or a formula. This may be useful to select the right fields, if they are not named after a naming convention.
18. MBS Function calls in blue
When you enter a MBS function in a calculation, we show MBS in blue. The function name entered behind it as parameter turns blue if the function is known to the plugin. It will show in red while the function name is not correct. So we open type something, see it in red and look for typos.
19. Palettes resizable and black
For the field picker in FileMaker 16, we can optionally make it resizable, so you can better read the content. For the button setup dialog, its much easier to find the right icon, if you can get a bigger view on the icons.
Optionally we can disable translucent background and make the window black & white. This makes reading text much easier and increases contrast.
20. Script highlight color
The default color for selection in the script workspace can be too light for some users. MBS Plugin allows you to define a custom color for the selection to make it darker.
21. Avoiding some problems
Over the years a few problems in FileMaker were highlighted to us. For some we could add a workaround in the plugin.
For example there is a problem with removeObserver function. If that method is called once too often, the Cocoa frameworks exit the app and reports a problem. This is not really useful for users, so we catch the exception and log it to the console.app without a crash. The error shows usually when you scroll and FM.PatchNotificationProblem function enables the feature in the plugin to prevent the crash.
We also patch a crash with isKeyWindow function.
Download now & try
And the best: All those features can be used without a license. We appreciate if you order licenses to honor our work, but it's not required. If you like to use the other 5000 functions in the plugin, you may need the license. If needed, you can request a trial license.
You can enable all the options via our preferences dialog. In your start script you can disable all those features for normal users to not confuse them if a red bracket shows.
Regularly we are asked for those features to be supported on Windows. Sorry to say, but supporting this on Windows is out of reach for us as we have not yet found a way to interact with controls on Windows. For Mac OS FileMaker uses standard controls from the OS, which we can extend and intercept messages. This gives us the possibility to add our features in a save way. If anything goes unexpected in the functions, we exit early and the feature is disabled.
After a day at the FileMaker Conference in Salzburg 2012 we relaxed at the hotel bar and talked about FileMaker feature wishes. One wish was syntax highlighting: Seeing in colors where Loops start and end was a topic we had.
So with plugin version 3.0 we introduced syntax coloring for FileMaker 11/12 on Mac OS X. With 3.2 we added colors for debugger, too. Finally with 3.5 we now mark typos with MBS function calls, highlights undeclared variables and also added line numbers.
Colors are applied to calculations, script editor and debugger.
So here we see the calculation dialog and you see that we have the calculation colored.
Compare the two calculations here. With wrong brackets, we highlight the wrong one with red color:
Now missing two brackets:
In the script editor we apply colors to the script entries. On the left side you see those colors as well as in the script steps on the right. We have rules defined to color the script steps based on the texts.
With plugin version 3.5, we also add optionally line numbers and you can define the color for those numbers.
Here in detail:
Also in debugger we can show colors:
This feature is fully customizable with the fmSyntaxColorizer database. Rules are defined there and you can modify them.
For example you can change colors, define special colors for global variables or custom functions.
The coloring is fully configurable with plugin functions listed on our documentation website. But before you reinvent the wheel, please check the fmSyntaxColorizer database. By default the plugin comes preconfigured with the colors defined in the fmSyntaxColorizer database.
Like to get colors? Simply drop the plugin in your FileMaker's extension folder on Mac and you get them all by default. Of course you can disable them. We do recommend to disable them for your users using the database solution. Only when you develop you should enable them to avoid side effects: While we try to color where we want to have color, it is possible to see sometimes colors on places where users may not want to see them.
Screenshots from FileMaker 12. Other versions may look different. The plugin works fine with version 11, 12 and 13.
MBS FileMaker blog