Troi File 2.0
Saturday 14th October, 2000
When it comes to examples of software ingenuity, there are none better than those where someone has taken the torturous FileMaker plug-in interface and come up with a set of elegant and useful functions. Troi Automatisering is an old hand at this; since we last reviewed its plug-ins (see Reviews, Vol 15 No 5, p37) it has released two major upgrades to what were already excellent utilities. As before, both plug-ins are compatible with FileMaker versions 4 and 5.
Troi Dialog 1.0 is perhaps the most frequently used of the company’s plug-ins, adding a list of features to FileMaker you’d have thought should have been included anyway. Up to four buttons could be named or hidden dynamically, and you were finally allowed to display dialog boxes that disappeared after a set time. Version 1.0 also provided text-entry dialog boxes - as plain text, password occluded, or both together - so users could enter text directly as a script was running without having to use global fields and special layouts. You could even display progress bar dialog boxes.
Version 2.0 adds just two new functions to what was already a fairly robust feature list. There’s now a more customisable DoDialogEx function. This allows you to specify the icon displayed in the dialog box - one of three standard icons (note, caution, or stop) or a custom icon which you can specify in advance using the new IconControl function. The plug-in now includes the DoListDialog function, which allows you to display a scrolling list of items from which the user can select one item. You can supply the list as static text, delimited by a bar character (|) or you can use a return-delimited field value. As with the other dialog boxes, you can specify up to four buttons. However, you can be even more picky and decide which button is the default, and which buttons are inactive until the user picks an item from the list. And, yes, you can use a custom icon. The one downside is that you can as yet only choose single items - let’s hope multiple selections will be available in version 3.
Apart from that, the implementation is well thought out: the user-enabled buttons provide a really slick feel to the whole thing. If you’re looking to produce a professional-looking solution using FileMaker, then this dialog box plug-in is a must-have.
If the additions to Troi Dialog looked a little sparse, then Troi File 2.0 has had them shoehorned in.
As well as the standard file functions for searching, opening, closing, reading, writing, renaming, deleting, copying and moving files that were available in version 1.0, there are about 14 new functions in version 2.0. Some are fairly trivial; others are less obvious and you probably won’t want to use them, but are added for completeness - ListDisks, for example, returns a list of available volumes, while UnmountDisk does just what it says.
There are also new functions for people who need to create cross-platform files. ConvertToFMText and ConvertFromFMText sort out the problems when moving files onto a PC from FileMaker’s Mac-like internal representation. GetPathToCurrentFile return’s the path to the current file, provided it isn’t hosted on another machine.
There are also a couple of industrial-strength additions. Substitute is a search-and-replace function for files: specify the text to search for, the text to replace it with, and the location of the file and the software does the rest. DeleteFolder will delete an entire folder and contents (although the description of this function is strangely omitted from the manual). As with all the other Troi functions, you can set options with each function, so that it will only delete empty folders. In any case, it will warn users before proceeding. SelectFolder lets you specify a folder as opposed to a file within a folder.
Version 2.0 also allows you to specify a default initial folder for any file dialog boxes, so that you can force a user to start looking in a particular place. The Troi File Plug-in is a very powerful addition to a FileMaker user’s armoury, so for peace of mind there are also functions to enable and disable the plug-in functions with a password.
There are, however, a couple of slight niggles with this plug-in. Even if you’re using FileMaker 5.0, some of the file dialog boxes display in grey, and some in white - and they don’t make use of the new File Manager dialog boxes. This may be due to backward compatibility issues, but it detracts from the look and feel of a FileMaker 5 solution.
On the positive side, Troi has improved its previously good documentation: both plug-ins come with numerous example files in FMPro 4 format, as well as online PDF manuals which provide both documentation and example scripts. Any serious FileMaker developer should have this plug-in in their toolbox.
A set of plug-ins that humanises FileMaker, but should really be included as standard.
|Get Further Info|
|Pros||Comprehensive text file functions and Finder file functions|
|Cons||Doesn't make use of new File Manager dialog boxes|
|Originally Published||MacUser, Volume: 16, Issue: 19, p31|