Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

MBS FileMaker Plugin Example Databases

Debugging and Registration

All examples are included with download of MBS FileMaker Plugin.

Debugging and Registration.fmp12

Overview
Tables 1
Relationships 0
Layouts 1
Scripts 5
Value Lists 0
Custom Functions 0
Custom Menus 24
File Options
Default custom menu set [Standard FileMaker Menus]
Default theme Apex Blue
When opening file
Minimum allowed version 12.0
Login using Account Name; Account= Admin
Allow user to save password On
Require iOS passcode Off
Show Sign-in fields Off
Switch to layout Off
Hide all toolbars Off
Script triggers
OnFirstWindowOpen Off
OnLastWindowClose Off
OnWindowOpen Off
OnWindowClose Off
OnFileAVPlayerChange Off
OnWindowTransaction Off
Thumbnail Settings
Generate Thumbnails On; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
MBSPlugin
3 fields defined, 0 record
MBSPlugin

Fields

Table Name: MBSPlugin - 3 Fields
Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
LicenseKeyServer Normal, Text Auto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Global
  • Repetitions: 1
  • Index Language: German
      LicenseKeyClient Normal, Text Auto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Global
      • Repetitions: 1
      • Index Language: German
          LicenseKeyRuntime Normal, Text Auto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Global
          • Repetitions: 1
          • Index Language: German

              Layout Objects: MBSPlugin

              Regular Fields

              Field Name: MBSPlugin::LicenseKeyServer
              Field Properties Coordinates Field Format Field Behavior Quick Find
              • Top: 198 pt
              • Left: 142 pt
              • Bottom: 219 pt
              • Right: 748 pt
              • Anchoring: Left and Right, Top
              Field Format:
              • Edit Box
              Field Behavior:
              • Allow field to be entered: In Find mode, In Browse mode
              • Touch keyboard type: Default for Data Type
              • Go to next field using: Tab key
              No

              Field Name: MBSPlugin::LicenseKeyClient
              Field Properties Coordinates Field Format Field Behavior Quick Find
              • Top: 221 pt
              • Left: 142 pt
              • Bottom: 242 pt
              • Right: 748 pt
              • Anchoring: Left and Right, Top
              Field Format:
              • Edit Box
              Field Behavior:
              • Allow field to be entered: In Find mode, In Browse mode
              • Touch keyboard type: Default for Data Type
              • Go to next field using: Tab key
              No

              Field Name: MBSPlugin::LicenseKeyRuntime
              Field Properties Coordinates Field Format Field Behavior Quick Find
              • Top: 244 pt
              • Left: 142 pt
              • Bottom: 265 pt
              • Right: 748 pt
              • Anchoring: Left and Right, Top
              Field Format:
              • Edit Box
              Field Behavior:
              • Allow field to be entered: In Find mode, In Browse mode
              • Touch keyboard type: Default for Data Type
              • Go to next field using: Tab key
              No

              Buttons

              Button Properties Coordinates Script/Script Step
                Type:
              • Text: Enable Trace locally
              • Top: 66 pt
              • Left: 19 pt
              • Bottom: 96 pt
              • Right: 179 pt
              • Anchoring: Left, Top
              Perform Script [ “Enable Trace” ]

              Scripts:


              Button Properties Coordinates Script/Script Step
                Type:
              • Text: Enable Trace on Server
              • Top: 108 pt
              • Left: 19 pt
              • Bottom: 138 pt
              • Right: 179 pt
              • Anchoring: Left, Top
              Perform Script [ “Enable Trace” ]

              Scripts:


              Button Properties Coordinates Script/Script Step
                Type:
              • Text: Enable Error Notifications
              • Top: 66 pt
              • Left: 319 pt
              • Bottom: 96 pt
              • Right: 479 pt
              • Anchoring: Left, Top
              Set Variable [ $r; Value:MBS("Trace.EnableErrorNotifications") ]

              Button Properties Coordinates Script/Script Step
                Type:
              • Text: Disable Error Notifications
              • Top: 108 pt
              • Left: 319 pt
              • Bottom: 138 pt
              • Right: 479 pt
              • Anchoring: Left, Top
              Set Variable [ $r; Value:MBS("Trace.DisableErrorNotifications") ]

              Button Properties Coordinates Script/Script Step
                Type:
              • Text: Register
              • Top: 276 pt
              • Left: 405 pt
              • Bottom: 306 pt
              • Right: 565 pt
              • Anchoring: Right, Top
              Perform Script [ “Register” ]

              Scripts:


              Button Properties Coordinates Script/Script Step
                Type:
              • Text: Is registered?
              • Top: 276 pt
              • Left: 588 pt
              • Bottom: 306 pt
              • Right: 748 pt
              • Anchoring: Right, Top
              Perform Script [ “IsRegistered” ]

              Scripts:


              Script Hierarchy

              Enable Trace
              Enable Trace on Server
              Register
              RegisterInternal
              IsRegistered

              Next Script: [Enable Trace on Server]
              Script Name Enable Trace
              Run script with full access privileges Off
              Siri Shortcut Visible Off
              Include In Menu Yes
              Layouts that use this script
              Scripts that use this script
              Script Definition
              Script Steps
              • If [ Get ( SystemPlatform ) = 3 ]
              • #iOS, no plugin
              • Exit Script [ ]
              • End If
              • If [ MBS("IsServer") ]
              • If [ MBS( "SystemInfo.isMacOSX" ) ]
              • If [ Get ( SystemPlatform ) = 4 ]
              • #Server on Mac for WebDirect
              • Set Variable [ $r; Value:MBS("Trace"; "/tmp/TraceFMServerWebDirect.txt") ]
              • Else [ ]
              • #Server on Mac
              • Set Variable [ $r; Value:MBS("Trace"; "/tmp/TraceFMServer.txt") ]
              • End If
              • Else [ ]
              • #Server on Windows
              • Set Variable [ $r; Value:MBS("Trace") ]
              • #read via DebugView app running as admin with Global Win32 logging enabled
              • End If
              • Else [ ]
              • If [ MBS( "SystemInfo.isMacOSX" ) ]
              • #Client on Mac
              • Set Variable [ $r; Value:MBS("Trace") ]
              • #read via Console.app
              • Else [ ]
              • #Client on Windows
              • Set Variable [ $r; Value:MBS("Trace") ]
              • #read via DebugView app
              • End If
              • End If
              Fields used in this script
                Scripts used in this script
                  Layouts used in this script
                    Tables used in this script
                      Table occurrences used by this script
                        Custom Functions used by this script
                          Custom menu set used by this script

                            Previous Script: [Enable Trace] Next Script: [Register]
                            Script Name Enable Trace on Server
                            Run script with full access privileges Off
                            Siri Shortcut Visible Off
                            Include In Menu Yes
                            Layouts that use this script
                              Scripts that use this script
                                Script Definition
                                Script Steps
                                • Perform Script on Server [ “Enable Trace” ]
                                Fields used in this script
                                  Scripts used in this script
                                  Layouts used in this script
                                    Tables used in this script
                                      Table occurrences used by this script
                                        Custom Functions used by this script
                                          Custom menu set used by this script

                                            Previous Script: [Enable Trace on Server] Next Script: [RegisterInternal]
                                            Script Name Register
                                            Run script with full access privileges Off
                                            Siri Shortcut Visible Off
                                            Include In Menu Yes
                                            Layouts that use this script
                                            Scripts that use this script
                                              Script Definition
                                              Script Steps
                                              • Perform Script [ “RegisterInternal” ]
                                              • # this will do nothing if no server is used
                                              • Perform Script on Server [ “RegisterInternal” ]
                                              Fields used in this script
                                                Scripts used in this script
                                                Layouts used in this script
                                                  Tables used in this script
                                                    Table occurrences used by this script
                                                      Custom Functions used by this script
                                                        Custom menu set used by this script

                                                          Previous Script: [Register] Next Script: [IsRegistered]
                                                          Script Name RegisterInternal
                                                          Run script with full access privileges Off
                                                          Siri Shortcut Visible Off
                                                          Include In Menu Yes
                                                          Layouts that use this script
                                                            Scripts that use this script
                                                            Script Definition
                                                            Script Steps
                                                            • If [ Get ( SystemPlatform ) = 3 ]
                                                            • # iOS, no plugin to register
                                                            • Exit Script [ ]
                                                            • End If
                                                            • If [ MBS("isRegistered") = 1 ]
                                                            • # already registered
                                                            • Show Custom Dialog [ Title: "MBS Plugin registration"; Message: "Already registered to " & MBS("Plugin.LicenseeName"); Default Button: “OK”, Commit: “Yes” ]
                                                            • Else If [ MBS("isRegistered") = 0 ]
                                                            • # register
                                                            • If [ MBS("IsServer") ]
                                                            • Set Variable [ $r; Value:Evaluate("MBS(\"StoreRegistration\"; " & MBSPlugin::LicenseKeyServer & ")") ]
                                                            • Else If [ MBS("isRuntime") ]
                                                            • Set Variable [ $r; Value:Evaluate("MBS(\"StoreRegistration\"; " & MBSPlugin::LicenseKeyRuntime & ")") ]
                                                            • Else [ ]
                                                            • Set Variable [ $r; Value:Evaluate("MBS(\"StoreRegistration\"; " & MBSPlugin::LicenseKeyClient & ")") ]
                                                            • End If
                                                            • Show Custom Dialog [ Title: "MBS Plugin registration"; Message: $r; Default Button: “OK”, Commit: “Yes” ]
                                                            • Else [ ]
                                                            • Show Custom Dialog [ Title: "MBS Plugin registration"; Message: "Plugin not installed?"; Default Button: “OK”, Commit: “Yes” ]
                                                            • End If
                                                            Fields used in this script
                                                            Scripts used in this script
                                                              Layouts used in this script
                                                                Tables used in this script
                                                                Table occurrences used by this script
                                                                Custom Functions used by this script
                                                                  Custom menu set used by this script

                                                                    Previous Script: [RegisterInternal]
                                                                    Script Name IsRegistered
                                                                    Run script with full access privileges Off
                                                                    Siri Shortcut Visible Off
                                                                    Include In Menu Yes
                                                                    Layouts that use this script
                                                                    Scripts that use this script
                                                                      Script Definition
                                                                      Script Steps
                                                                      • Set Variable [ $r; Value:MBS( "IsRegistered" ) ]
                                                                      • If [ $r = 1 ]
                                                                      • Show Custom Dialog [ Title: "Registration"; Message: "The MBS Plugin is registered for " & MBS("Plugin.LicenseeName"); Default Button: “OK”, Commit: “Yes” ]
                                                                      • Else If [ $r = 0 ]
                                                                      • Show Custom Dialog [ Title: "Registration"; Message: "The MBS Plugin is not registered."; Default Button: “OK”, Commit: “Yes” ]
                                                                      • Else [ ]
                                                                      • Show Custom Dialog [ Title: "Registration"; Message: "The MBS Plugin is not installed!"; Default Button: “OK”, Commit: “Yes” ]
                                                                      • End If
                                                                      Fields used in this script
                                                                        Scripts used in this script
                                                                          Layouts used in this script
                                                                            Tables used in this script
                                                                              Table occurrences used by this script
                                                                                Custom Functions used by this script
                                                                                  Custom menu set used by this script

                                                                                    Download example: Debugging and Registration

                                                                                    Used functions: