Example: /MacOSX/User list MacOSX

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

/MacOSX/User list MacOSX


Required plugins for this example: MBS MacCF Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacOSX/User list MacOSX

This example is the version from Tue, 29th Jul 2019.

Project "User list MacOSX.xojo_binary_project"
Class MainWindow Inherits Window
Control List Inherits ListBox
ControlInstance List Inherits ListBox
End Control
EventHandler Sub Open() // we look what user the current desktop belongs Dim l As New DarwinUserListMBS Dim c As Integer = l.Count-1 For n As Integer = 0 To c Dim i As DarwinUserMBS = l.User(n) if i<>nil and i.Ready then List.AddRow i.Name Dim a As Integer = List.LastIndex List.cell(a,1)=str(i.UserID) List.cell(a,2)=str(i.GroupID) List.cell(a,3)=i.HomePath List.cell(a,4)=i.Shell List.cell(a,5)=i.LongName end if next Exception MsgBox "We have a problem."+chr(13)+"This demo works only on Mac OS X!" End EventHandler
End Class
MenuBar Menu
MenuItem UntitledMenu3 = ""
MenuItem UntitledMenu2 = "File"
MenuItem FileQuit = "Quit"
MenuItem UntitledMenu7 = ""
MenuItem UntitledMenu0 = "Edit"
MenuItem EditUndo = "Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cut"
MenuItem EditCopy = "Copy"
MenuItem EditPaste = "Paste"
MenuItem EditClear = "Clear"
MenuItem UntitledMenu6 = ""
MenuItem UntitledMenu5 = ""
MenuItem UntitledMenu4 = ""
End MenuBar
Class App Inherits Application
EventHandler Sub Open() if TargetMachO then // ok else MsgBox "This needs a Mach-O target running on Mac OS X." end if End EventHandler
End Class
End Project

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


💬 Ask a question or report a problem