How do I turn on the Old Style Functions in the Pro plug-ins?
If you want to upgrade from a Classic plug-in to a Pro plug-in, but not rewrite your scripts right away (from the old classic syntax), you can turn on the backward compatibility option. This is just meant to be a temporary solution until scripts can be updated for the new functions.
The backward compatibility option under FileMaker Pro 11.0v1 on OSX does not work due to a bug in FileMaker. Please update to at least FileMaker 11.0v2 to correct this issue. You can update by going to the Help menu inside FileMaker and selecting the "Check for Updates..." menu item.
Configuration Dialog
To turn this option on via the configuration dialog, open FileMaker and go to the FileMaker Menu (on Mac) or Edit (on Windows), Preferences, Plug-ins tab, double-click the plug-in name, Advanced tab. Finally, select either "Enable Old Style Functions" or "Enable Both". Next, click OK on all the dialogs, and then restart FileMaker. Your scripts that were written for the old plug-in will now continue to work with the Pro plug-in.
Function
You can also set the backward compatibility option via script using the plug-in's functions. The "Plug-inName_Configure" function allows this. There are two preferences when working with this option, the "UseNewFunctions", and the "UseOldFunctions". Both preferences are boolean values, and the "UseNewFunctions" preference is enabled by default (i.e. has a value of 1). This means by default, the plug-in is set to the following:
New Style Functions - 1 (enabled)
Old Style Functions - 0 (disabled)
In order to enable backward compatibility (e.g. turn on the old style functions), use the Configure function to set the "OldStyleFunctions" preference to 1. For example:
SMTPit_Configure( "Set"; "UseOldFunctions"; 1 )
Calling this function is the equivalent of setting the backward compatibility option in the configuration dialog to "both". Note, there is no need to set the "UseNewFunctions" preference to 1 as it is already set to this by default.
You can also retrieve the current value of the preferences using the "Get" option and the name of the preference. For example:
SMTPit_Configure( "Get"; "UseOldFunctions" )
