Example: /MacCocoa/NSProcessInfo Example

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

/MacCocoa/NSProcessInfo Example


Required plugins for this example: MBS Main Plugin, MBS MacCocoa Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacCocoa/NSProcessInfo Example

This example is the version from Tue, 3rd Aug 2015.

Project "NSProcessInfo Example.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control List Inherits Listbox
ControlInstance List Inherits Listbox
End Control
EventHandler Sub Open() #pragma BreakOnExceptions false dim p as NSProcessInfoMBS = new NSProcessInfoMBS List.AddRow "processname", p.processName List.AddRow "hostName", p.hostName List.AddRow "processIdentifier", str(p.processIdentifier) List.AddRow "globallyUniqueString", p.globallyUniqueString List.AddRow "operatingSystem", str(p.operatingSystem) // always 5 for Mac OS X List.AddRow "operatingSystemName", p.operatingSystemName List.AddRow "operatingSystemVersionString", p.operatingSystemVersionString try // 10.5 or newer List.AddRow "processorCount", str(p.processorCount) List.AddRow "activeProcessorCount", str(p.activeProcessorCount) List.AddRow "physicalMemory", str(p.physicalMemory) catch n as NSExceptionMBS // ignore end try try // 10.6 or newer List.AddRow "systemUptime", str(p.systemUptime) catch n as NSExceptionMBS // ignore end try dim u as integer = p.argumentsCount-1 for i as integer = 0 to u List.AddRow "Argument("+str(i)+")", p.argument(i) next dim dic as Dictionary = p.environment for each key as Variant in dic.keys List.AddRow key, dic.Value(key) next End EventHandler
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&File"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "Select &All"
End MenuBar
End Project

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


💬 Ask a question or report a problem