Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/MacOSX/Mount or Unmount Disk
Function:
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacOSX/Mount or Unmount Disk
This example is the version from Sun, 2nd Jun 2018.
Project "Mount or Unmount Disk.rbp"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control iURL Inherits TextField
ControlInstance iURL Inherits TextField
End Control
Control Label1 Inherits Label
ControlInstance Label1 Inherits Label
End Control
Control iDest Inherits TextField
ControlInstance iDest Inherits TextField
End Control
Control iUser Inherits TextField
ControlInstance iUser Inherits TextField
End Control
Control iPass Inherits TextField
ControlInstance iPass Inherits TextField
End Control
Control CheckInteraction Inherits CheckBox
ControlInstance CheckInteraction Inherits CheckBox
End Control
Control CheckPrompt Inherits CheckBox
ControlInstance CheckPrompt Inherits CheckBox
End Control
Control Label2 Inherits Label
ControlInstance Label2 Inherits Label
End Control
Control Label3 Inherits Label
ControlInstance Label3 Inherits Label
End Control
Control Label4 Inherits Label
ControlInstance Label4 Inherits Label
End Control
Control iPath Inherits TextField
ControlInstance iPath Inherits TextField
End Control
Control Label5 Inherits Label
ControlInstance Label5 Inherits Label
End Control
Control MountButton Inherits PushButton
ControlInstance MountButton Inherits PushButton
EventHandler Sub Action() dim ErrorCode as integer dim p as string p = MountMBS(iURL.text, iDest.text, iUser.text, iPass.text, CheckInteraction.Value, CheckPrompt.value, ErrorCode) if p <> "" then MsgBox "Mounted: "+p else MsgBox "Failed. Errorcode: "+str(ErrorCode) end if Exception r as runtimeException MsgBox Introspection.GetType(r).fullname+": "+r.message End EventHandler
End Control
Control CheckForce Inherits CheckBox
ControlInstance CheckForce Inherits CheckBox
End Control
Control UnmountButton Inherits PushButton
ControlInstance UnmountButton Inherits PushButton
EventHandler Sub Action() if UnmountMBS(iPath.text, CheckForce.Value) then MsgBox "OK" else MsgBox "Failed." end if Exception r as runtimeException MsgBox Introspection.GetType(r).fullname+": "+r.message End EventHandler
End Control
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
End Project

Feedback, Comments & Corrections

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




Links
MBS Xojo Chart Plugins