Adds a BlackBox to Reactor from either a URL or a container field.
| Function ID |
31 |
| Example |
BlackBoxAdd( blackboxLocation ) |
| Success return values |
(when using a local container) OK: BlackBox loaded. (when using a url to download) [Container Data] |
| Error return values |
Error: There was an error downloading the BlackBox. Error: Unable to extract the BlackBox from container. Error: There was an error parsing the BlackBox. Error: Unable to write BlackBox to disk. Error: BlackBox needs matching registration code. Error: Reactor not running. |
BlackBox Location
A BlackBox can be installed on a users computer from two distinct locations:
- From a container field in the database (the container field).
- Downloaded from external server (the URL to the BlackBox file).
If you are using BlackBoxAdd in your startup script, you should first check the version number of the installed BlackBox against the version that is in the container field, and run BlackBoxAdd accordingly. In a wide area network, FileMaker will download the entire BlackBox every time the script is run, and may result in poor performance while FileMaker client waits to receive the BlackBox file.
Download and install using a URL
Using BlackBoxAdd to download and install a BlackBox from an external server is a useful way to provide an update mechanism. You can see an implementation of this in the Reactor Core (demo) file on the MyReactor tab. The BlackBoxUpdater will first check your installed BlackBoxes against a manifest file, and will then allows the user to update their BlackBox by directly downloading the BlackBox.
Using the remote URL method, the BlackBoxAdd function will return file data which can be set directly into a container field for later use by other clients (meaning that you could develop your script so that only a single client would need to download the remote file, instead of each client).
Comments