MBS FileMaker Plugin Example Databases

TCP Receiver

All examples are included with download of MBS FileMaker Plugin.

TCP Receiver.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts4
Value Lists0
Custom Functions0
Custom Menus33
File Options
Default custom menu set[Standard FileMaker Menus]
When opening file
Minimum allowed version12.0
Login usingAccount Name; Account= Admin
Allow user to save passwordOff
Require iOS passcodeOff
Switch to layoutOff
Hide all toolbarsOff
Script triggers
OnFirstWindowOpenOff
OnLastWindowCloseOff
OnWindowOpenOff
OnWindowCloseOff
OnFileAVPlayerChangeOff
Thumbnail Settings
Generate ThumbnailsOn; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
TCP Receiver
4 fields defined, 0 record
TCP Receiver

Fields

Table Name: TCP Receiver - 4 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
PortNormal, NumberAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      IPNormal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          MessageNormal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              ListenPortNormal, NumberAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Global
              • Repetitions: 1
              • Index Language: German

                  Layout Objects: TCP Receiver

                  Regular Fields

                  Field Name: TCP Receiver::Port
                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                  • Top: 66 pt
                  • Left: 138 pt
                  • Bottom: 80 pt
                  • Right: 391 pt
                  • Anchoring: Left, Top
                  Field Format:
                  • Edit Box
                  Field Behavior:
                  • Allow field to be entered: In Find mode, In Browse mode
                  • Touch keyboard type: System Default
                  • Go to next field using: Tab key
                  Yes

                  Field Name: TCP Receiver::IP
                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                  • Top: 84 pt
                  • Left: 138 pt
                  • Bottom: 98 pt
                  • Right: 391 pt
                  • Anchoring: Left, Top
                  Field Format:
                  • Edit Box
                  Field Behavior:
                  • Allow field to be entered: In Find mode, In Browse mode
                  • Touch keyboard type: System Default
                  • Go to next field using: Tab key
                  Yes

                  Field Name: TCP Receiver::Message
                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                  • Top: 102 pt
                  • Left: 138 pt
                  • Bottom: 116 pt
                  • Right: 391 pt
                  • Anchoring: Left, Top
                  Field Format:
                  • Edit Box
                  Field Behavior:
                  • Allow field to be entered: In Find mode, In Browse mode
                  • Touch keyboard type: System Default
                  • Go to next field using: Tab key
                  Yes

                  Field Name: TCP Receiver::ListenPort
                  Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                  • Top: 6 pt
                  • Left: 78 pt
                  • Bottom: 20 pt
                  • Right: 157 pt
                  • Anchoring: Left, Top
                  Field Format:
                  • Edit Box
                  Field Behavior:
                  • Allow field to be entered: In Find mode, In Browse mode
                  • Touch keyboard type: System Default
                  • Go to next field using: Tab key
                  No

                  Group Buttons

                  Button PropertiesCoordinatesScript/Script Step
                    Type:
                  • Text: Create Socket and Listen
                    Additional Properties:
                  • Change to hand cursor over button
                  • Rectangular
                  • Top: 12 pt
                  • Left: 186 pt
                  • Bottom: 38 pt
                  • Right: 343 pt
                  • Anchoring: Left, Top
                  Perform Script [ “CreateSocket” ]

                  Scripts:


                  Script Hierarchy

                  CreateSocket
                  ReadSomething
                  NewConnection
                  SocketError

                  Next Script: [ReadSomething]
                  Script NameCreateSocket
                  Run script with full access privilegesOff
                  Include In MenuYes
                  Layouts that use this script
                  Scripts that use this script
                    Script Definition
                    Script Steps
                    • If [ not (GetAsNumber($$sock) > 0) ]
                    • Set Variable [ $$sock; Value:MBS("Socket.NewTCPSocket") ]
                    • If [ MBS("IsError") ]
                    • Show Custom Dialog [ Title: "Failed to create Socket"; Message: $$sock; Default Button: “OK”, Commit: “No”; Button 2: “Cancel”, Commit: “No” ]
                    • Exit Script [ ]
                    • End If
                    • Set Variable [ $r; Value:MBS("Socket.SetNewConnectionHandler"; $$sock; Get(FileName); "NewConnection") ]
                    • Set Variable [ $r; Value:MBS("Socket.SetErrorHandler"; $$sock; Get(FileName); "SocketError") ]
                    • Set Variable [ $r; Value:MBS("Socket.Listen"; $$sock; TCP Receiver::ListenPort) ]
                    • If [ MBS("IsError") ]
                    • Show Custom Dialog [ Title: "Failed to create Socket"; Message: $$sock; Default Button: “OK”, Commit: “No”; Button 2: “Cancel”, Commit: “No” ]
                    • Exit Script [ ]
                    • 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: [CreateSocket]Next Script: [NewConnection]
                            Script NameReadSomething
                            Run script with full access privilegesOff
                            Include In MenuNo
                            Layouts that use this script
                              Scripts that use this script
                                Script Definition
                                Script Steps
                                • Set Variable [ $sock; Value:Get(ScriptParameter) ]
                                • Set Variable [ $r; Value:MBS("Socket.Read"; $sock; 1500; "UTF-8") ]
                                • If [ Left($r; 5) = "[MBS]" ]
                                • Show Custom Dialog [ Title: "Error Reading"; Message: $r; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                                • Else If [ Length($r) = 0 ]
                                • // Show Custom Dialog [ Title: "Error Reading"; Message: "No data available."; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                                • Else
                                • New Record/Request
                                • Set Field [ TCP Receiver::Message; $r ]
                                • Set Field [ TCP Receiver::IP; MBS("Socket.RemoteIP"; $sock) ]
                                • Set Field [ TCP Receiver::Port; MBS("Socket.RemotePort"; $sock) ]
                                • Commit Records/Requests [ No dialog ]
                                • End If
                                • Set Variable [ $r; Value:MBS("Socket.Close"; $sock) ]
                                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: [ReadSomething]Next Script: [SocketError]
                                        Script NameNewConnection
                                        Run script with full access privilegesOff
                                        Include In MenuNo
                                        Layouts that use this script
                                          Scripts that use this script
                                            Script Definition
                                            Script Steps
                                            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: [NewConnection]
                                                          Script NameSocketError
                                                          Run script with full access privilegesOff
                                                          Include In MenuNo
                                                          Layouts that use this script
                                                            Scripts that use this script
                                                              Script Definition
                                                              Script Steps
                                                              • Set Variable [ $sock; Value:Get(ScriptParameter) ]
                                                              • Show Custom Dialog [ Title: "Socket Error"; Message: "For Socket " & $sock; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                                                              • Set Variable [ $r; Value:MBS("Socket.Close"; $sock) ]
                                                              • Set Variable [ $$sock; Value:"" ]
                                                              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: TCP Receiver

                                                                            Used functions:




                                                                            Links
                                                                            MBS Xojo Plugins