Troi Dialog Plugin for FileMaker 14 logo

Troi Dialog Plug-in 6.5.1

FileMaker Pro 12 through 15 compatible

Troi Dialog Plug-in adds powerful dialog functions to FileMaker Pro.

overview | download | details | screenshots | comments | buy-it

Troi Dialog Plug-in conversion from FMP6

We have two flavors of Dialog plug-ins: Troi Dialog Plug-in 3.6 which uses the Classic API (function syntax) and Troi Dialog Plug-in 4 (or higher) which uses the FileMaker 7 Native API introduced with FileMaker 7. Below you find a discussion of both plug-ins.

Below we will discuss Troi Dialog Plug-in 4.0, but this also should apply to future versions with a higher number, for example version 6.0.
(This page was last updated July 18th, 2006.)

NOTE The function API is the same for FileMaker Pro 7 through FileMaker Pro 15.

TIP Although you can use both Troi Dialog Plug-in 3.6 and Troi Dialog Plug-in 4.0 together when running FileMaker 7, this is not recommended. Please only use Troi Dialog Plug-in 4.0 for FileMaker Pro 7 and only use Troi Dialog Plug-in 4.5 for FileMaker Pro 8 and 8.5.

Troi Dialog Plug-in 3.6 is compatible with FileMaker 7

Troi Dialog Plug-in 3.6 in general does work with FileMaker Pro 7, without modification. We have found no other issues with FileMaker 7 than the ones below.

Delay in visibility of the TrDl-ProgressBar function

FileMaker Pro 7 has a subtle change in how it handles plug-ins. This results in a delay in showing the contents of the progress bar. You will first see the dialog window, without any text and progress bar drawn in. After a short delay it will show the correct contents.

UPDATE To improve this: Add an extra Pause/Resume step of 0 seconds after the 'show' step. This will cause the progress bar and text to be directly visible. See the updated example file.

Modify scripts which set a custom icon

The current version of FileMaker 7 seems to have a bit of delay in updating a the clipboard, after you have used the Copy script step. This will result in a $$-4239 error (kErrClipboardNotOpen) from the TrDl-IconControl function of the plug-in. This error occurs only on Windows.

To prevent this you must change the scripts with the TrDl-IconControl function.

If for example you have this script in a FileMaker Pro 7 file:

Copy[ Select ; gCustomIconField ]
Set Field [ gErrorcode ; External("TrDl-IconControl", "-setCustomIcon") ]

You need to change it to:

Copy[ Select ; gCustomIconField ]
If [ Abs( Get ( SystemPlatform ) ) = 2 ]
# This step below is needed on Windows and FileMaker 7, to make sure the icon is properly set.
Pause/Resume Script [Duration(seconds): 0]

End If
Set Field [ gErrorcode ; External("TrDl-IconControl", "-setCustomIcon") ]

This will pause FileMaker long enough to get the icon on the clipboard. See also the fp7 example files of Troi Dialog 3.6, which have this modification applied.

General Issue for all Classic plug-ins with higher ASCII's

FileMaker Pro 7 has a new internal architecture, which is using Unicode for the text fields. FileMaker Pro 6 only used ASCII encoding. ALL plug-ins written for the 'classic' FileMaker 6 architecture do not receive characters that are outside this ASCII range, these characters are replaced with spaces. In general our plug-ins should be compatible as long as the text used is lower ASCII text.

The Dialog Plug-in 3.6 is using the classic API, so only characters in the ASCII range will work.

Previous versions of Troi Dialog

We have tested version 3.5.2 and version 3.5.3 with FileMaker 7 and this works similar as version 3.6. We have not tested earlier versions, but we expect versions 3.5.1 or older of the plug-in to work with FileMaker 7, however this latest version has some bug fixes too, so it is strongly recommend that you use the latest version.


Troi Dialog Plug-in 4.0 (Native FileMaker 7 API)

Troi Dialog Plug-in 4 was created specifically for FileMaker Pro 7. Below are some considerations when converting to Troi Dialog Plug-in 4.

New function syntax

The plug-in functions have a different syntax compared to the FileMaker 6 plug-in.

For example the Dial_Dialog function has this syntax in the classic API:

External("TrDl-DialogEx", "switches|text|button1|button2|button3|button4" )

The syntax in the new API looks like this:

Dial_Dialog(switches ;
            text ; button1; { button2 ; { button3 ; { button4 }}} )

Note that functions look like a real function call, no longer a call to External(). Also a hyphen "-" is no longer allowed in the function name, so the hyphens have changed to underscores "_" instead. Note too that parameters don't have to be concatenated with a pipe. Instead use a semicolon ";" to separate the parameters. The brackets "{}" indicate optional parameters. Below is an example how this function would appear in ScriptMaker:

Set Field [result ,
              Dial_Dialog( "-Unused" ; "Hello World" ; "OK" ; ) ]

TIP Function names are no longer case sensitive and will change to the correct case after you close the "Specify Calculation" dialog box.

Multiple parameters and new switches

As seen from the syntax, plug-in functions now can have multiple parameters. To make this plug-in more consistent, all functions now have a switches parameter as the first parameter. This makes enhancing the plug-in in the future easier. Finally we renamed a few functions and also removed any spaces in the name. See the specific functions notes below for the specifics.

TIP Switches are not case sensitive.

Omitting optional parameters

When you omit an optional parameter be sure to add an extra semicolon after the last one, otherwise FileMaker will show an alert that there are too few parameters in this function. For example, below we omitted the 5th and 6th parameter at the end (button3 and button4). This is the correct way to do this:

Set Field [ result,
          Dial_Dialog("-Unused" ; "Hello World" ; "OK" ; "Cancel" ; )]

New parameter limits

The plug-in functions now have a size limit of 1 Gb per parameter (up from the total of 64000 character limit for all parameters in FileMaker 6). The Troi Dialog Plug-in 4 in general can handle bigger parameters, however not all dialogs have the room to display these long text.

Converting the function call

When converting FileMaker does not change the plug-in call. So after conversion you need to do this manually. Here are the global steps:

  • remove the External(" at the beginning
  • in the function name: change TrDl- to Dial_ and remove spaces, add a ( at the end.
  • change the name of the function (in some cases)
  • add as first parameter: "-Unused" (if no switch parameter is there)
  • split the remaining parameters: separate each with a ;

Let's for example take this Troi Dialog Plug-in 3.6 call:

External("TrDl-DoFlashDialog", "360|Hi, This is a Flash Dialog.") )

This needs to be changed to this Dialog Plug-in 4 call:

Dial_FlashDialog( "-Unused" ; 360 ; "Hi, This is a Flash Dialog.")

TIP You can just copy script or steps from the example files of the Dialog download, they are all in the Dialog Plug-in 4 format!

Renamed functions

The table below will help you figure out the new names for changed function names:

Old function name New function name Notes
TrDl-DialogEx Dial_Dialog renamed.
TrDl-DoDialog NOT AVAILABLE obsolete, use Dial_Dialog instead.
TrDl-DoFlashDialog Dial_FlashDialog renamed.
TrDl-DoListDialog Dial_ListDialog renamed.
Troi-Set Default Separator NOT AVAILABLE obsolete; parameters are already separated.
Troi-Set Separator Once NOT AVAILABLE obsolete; parameters are already separated.

Specific functions notes

All functions of Troi Dialog Plug-in 4 fully support Unicode, unless noted otherwise.

The table below lists conversion issues with specific functions:

Function name Notes
Dial_BigInputDialog Mac OS: no Unicode support yet.
Dial_Dialog This function does no longer implements the obsolete switches "input", "password" and "userpassword". When you use one of these switches the function returns the error -4243 = kErrNotImplemented. Please use the more versatile Dial_InputDialog function instead.
Dial_FlashDialog The switches parameter is now the first parameter (it was the last one). Mac OS: now supports more than 255 characters.
Dial_IconControl No longer uses the clipboard, but a container parameter. Mac OS: supports PICT format and JPEG (with QuickTime installed). Windows: supports JPEG and GIFs. Windows: icons with transparant pieces will be white.
Dial_ListDialog Mac OS: no Unicode support yet. Windows: Unicode support except for the list items themselves.
Dial_SetListInput Mac OS: no Unicode support yet.

Unicode Support

Most of the functions of Troi Dialog Plug-in 4 fully support Unicode. The table below lists Unicode support for each function of the plug-in:

Function name Mac OS X Windows
Dial_BigInputDialog no Unicode support Unicode ready!
Dial_DelayTicks Unicode ready! Unicode ready!
Dial_Dialog Unicode ready! Unicode ready!
Dial_FlashDialog Unicode ready! Unicode ready!
Dial_GetButton Unicode ready! Unicode ready!
Dial_GetInput Unicode ready! Unicode ready!
Dial_GetPopup Unicode ready! Unicode ready!
Dial_IconControl Unicode ready! Unicode ready!
Dial_InputDialog Unicode ready! Unicode ready!
Dial_ListDialog no Unicode support no Unicode support
Dial_ProgressBar Unicode ready! Unicode ready!
Dial_SetDialogTitle Unicode ready! Unicode ready!
Dial_SetInput Unicode ready! Unicode ready!
Dial_SetLabels Unicode ready! Unicode ready!
Dial_SetListInput no Unicode support Unicode ready!
Dial_Popup Unicode ready! Unicode ready!
Dial_Position Unicode ready! Unicode ready!
Dial_Preference Unicode ready! Unicode ready!
Dial_Version Unicode ready! Unicode ready!

Please report problems and bugs

If you find any other problems or bugs, not mentioned above, please send us an email. you can find our email address on our contact page. Please do NOT send attachments unless specifically requested. Please include the FileMaker Pro version, your platform and operating system in your comments.

Back to details Dialog Plug-in page

 ©2017 Troi Automatisering