Xojo Conferences

Platforms to show: All Mac Windows Linux Cross-Platform

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/Master
This example is the version from Wed, 1st Apr 2014.
Project "Master.rbp"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
EventHandler Sub Open() connection = new MyNSXPCConnectionMBS("com.mycompany.helper") connection.resume dim params() as Variant params.Append 1 params.Append 2 connection.CallMethod("Test", nil, params) End EventHandler
Property connection As NSXPCConnectionMBS
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
Class MyNSXPCConnectionMBS Inherits NSXPCConnectionMBS
EventHandler Sub CallMethodReturned(name as string, tag as variant, Parameters() as variant, Results() as variant) System.DebugLog CurrentMethodName MsgBox "Got result: "+Results(0) End EventHandler
EventHandler Sub ErrorHandler(error as NSErrorMBS) System.DebugLog CurrentMethodName MsgBox "Got error: "+error.LocalizedDescription End EventHandler
EventHandler Sub InterruptionHandler() System.DebugLog CurrentMethodName MsgBox "Service app crashed." End EventHandler
EventHandler Sub InvalidationHandler() System.DebugLog CurrentMethodName MsgBox "Service app invalidated connection." End EventHandler
End Class
End Project

Feedback, Comments & Corrections

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

MBS Xojo Chart Plugins