Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/MacFrameworks/NSXPC/Helper
Function:
Required plugins for this example: MBS MacFrameworks Plugin, MBS Main Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacFrameworks/NSXPC/Helper
This example is the version from Wed, 1st Apr 2014.
Project "Helper.rbp"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
EventHandler Sub Open() System.DebugLog CurrentMethodName // using serviceListener myListener = new Listener // for this example with a macho name: 'myListener = new Listener("com.mycompany.helper") // and start it myListener.resume End EventHandler
Property myListener As Listener
End Class
Class Window1 Inherits Window
End Class
MenuBar MainMenuBar
MenuItem FileMenu = "&File"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem EditSeparator1 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "#App.kEditClear"
MenuItem EditSeparator2 = "-"
MenuItem EditSelectAll = "Select &All"
End MenuBar
Script1
End Script1
Class Listener Inherits NSXPCListenerMBS
EventHandler Function CallMethod(Name as string, Parameters() as variant) As variant() System.DebugLog CurrentMethodName dim results() as Variant dim d1 as Double = results(0) dim d2 as Double = results(0) dim sum as Double = d1+d2 results.Append sum Return results End EventHandler
EventHandler Function shouldAcceptNewConnection(newConnection as NSXPCConnectionMBS) As boolean // accept everyone System.DebugLog CurrentMethodName newConnection.resume Return true End EventHandler
End Class
End Project

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS MacFrameworks Plugin.




Links
MBS FileMaker Plugins