Platforms to show: All Mac Windows Linux Cross-Platform
Required plugins for this example: MBS Main Plugin, MBS Swift Plugin
Last modified Mon, 23th Nov 2025.
You find this example project in your MBS Xojo Plugin download as a Xojo project file within the examples folder: /Swift/requestAgeRange
Download this example: requestAgeRange.zip
Project "requestAgeRange.xojo_binary_project"
Class App Inherits DesktopApplication
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class MainWindow Inherits DesktopWindow
Control RequestButton Inherits DesktopButton
ControlInstance RequestButton Inherits DesktopButton
EventHandler Sub Pressed()
Me.Enabled = False
StoreKit2MBS.requestAgeRange(13, 16, 18, AddressOf requestAgeRangeCompleted)
End EventHandler
End Control
Control LogList Inherits DesktopListBox
ControlInstance LogList Inherits DesktopListBox
End Control
Private Sub requestAgeRangeCompleted(errorMessage as String, result as Dictionary)
Var list As DesktopListbox = LogList
If errorMessage <> "" Then
list.AddRow "Error: "+errorMessage
End If
If result <> Nil Then
for each d as DictionaryEntry in result
list.AddRow d.Key+": "+d.Value
next
End If
RequestButton.Enabled = True
End Sub
Property Private ex As NSExceptionMBS
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"
MenuItem WindowMenu = "Window"
MenuItem HelpMenu = "&Help"
End MenuBar
Sign
End Sign
End Project
Download this example: requestAgeRange.zip
The items on this page are in the following plugins: MBS Swift Plugin.