Platforms to show: All Mac Windows Linux Cross-Platform
/Util/Process/Process Information
Required plugins for this example: MBS Util Plugin, MBS MacCF Plugin, MBS Main Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Util/Process/Process Information
This example is the version from Sun, 17th Mar 2012.
Project "Process Information.xojo_binary_project"
Class Window1 Inherits Window
Control List Inherits ListBox
ControlInstance List Inherits ListBox
End Control
EventHandler Sub Open()
dim p as ProcessMBS
dim d as CFDictionaryMBS
p=new ProcessMBS
p.GetCurrentProcess
d=CFDictionaryMBS(p.ProcessInformationCFDictionary)
if d=nil then
MsgBox "This example works only on Mac OS X 10.2!"
else
filllist d
end if
End EventHandler
Sub fillList(d as cfdictionarymbs)
dim l as CFDictionaryListMBS
dim i,c as integer
dim o as CFObjectMBS
dim s,t as String
dim cfs as CFStringMBS
dim cfb as CFBooleanMBS
dim cfn as CFNumberMBS
l=d.List
c=l.Count-1
for i=0 to c
o=l.Key(i)
s=""
if o isa CFStringMBS then
cfs=CFStringMBS(o)
s=cfs.str
end if
t=""
o=l.Value(i)
if o isa CFStringMBS then
cfs=CFStringMBS(o)
t=cfs.str
elseif o isa CFBooleanMBS then
cfb=CFBooleanMBS(o)
if cfb.Value then
t="true"
else
t="false"
end if
elseif o isa CFNumberMBS then
cfn=CFNumberMBS(o)
t=str(cfn.doubleValue)
else
t="? (not handled CF Type)"
end if
if s<>"" then
List.AddRow s
List.Cell(List.LastIndex,1)=t
end if
next
End Sub
End Class
MenuBar Menu
MenuItem UntitledMenu3 = ""
MenuItem UntitledMenu2 = "File"
MenuItem FileQuit = "Quit"
MenuItem UntitledMenu0 = "Edit"
MenuItem EditUndo = "Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cut"
MenuItem EditCopy = "Copy"
MenuItem EditPaste = "Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
End Class
End Project
See also:
The items on this page are in the following plugins: MBS Util Plugin.