Simple Runtime Reference
August 2009
Version 0.1.1
1
Functions
• Application - Various application related runtime functions
• Arrays - Various array related runtime functions
• Assertions - Checking the runtime state of an application
• Collection - Unordered set of items
• Conversions - Various conversion related runtime functions
• Dates - Various date and time related runtime functions
• Files - Various file related runtime functions Log - Logging related runtime functions
• Math - Various mathematical runtime functions
• Strings - Various string related runtime functions
Components
• AccelerometerSensor - Sensor to measure acceleration in 3 dimensions
• Button - Push-style button
• Canvas - Surface to draw on
• CheckBox - Two state button that can either be checked or un-checked
• EmailPicker - Editable text box using auto-completion to pick out an email address
from contacts
• Form - Root component container
• Image - Component for displaying images
• Label - Text display
• LocationSensor - Sensor to provide information about the current location
• OrientationSensor - Sensor to measure absolute orientation in 3 dimensions
• Panel - Container for other components
• PasswordTextBox - Editable text box for entering passwords
• Phone - Component providing phone-related functionality
• RadioButton - Two state button that can either be checked or un-checked
• TextBox - Editable text box
• Timer - Timer component
Layouts
• FrameLayout - Layout for prominently showing a single component
• LinearLayout - Layout for placing components horizontally or vertically
• TableLayout - Layout for placing components in tabular form
Runtime Errors
• AssertionFailure - Indicates an assertion failure
• ConversionError - Indicates a failed attempt to convert a value of one type into
another
• FileAlreadyExistsError - Indicates a failed attempt to create a file
• FileIOError - Indicates a problem accessing a file
2
• IllegalArgumentError - Indicates an illegal value for a function or procedure
argument
• IndexOutOfBoundsError - Indicates an array or collection access with an index that
is outside of bounds
• NoSuchFileError - Indicates that no file for the given name could be found
• PropertyAccessError - Indicates illegal access to a property
• UninitializedInstanceError - Indicates access to uninitialized object or array variable
• UnknownFileHandleError - Indicates usage of an unknown file handle
• UnknownIdentifierError - Indicates that an identifier could not be resolved at
runtime
3
namespace com.google.devtools.simple.runtime
Application
Various application related runtime functions.
• AddMenuItem - Creates a new menu item with the given caption.
• Finish - Terminates this application.
• GetPreference - Retrieves the value of a previously stored preference (even from
previous of the same program).
• StorePreference - Stores the given value under given name.
• SwitchForm - Display a different form.
AddMenuItem
Static Sub AddMenuItem(caption As String)
Creates a new menu item with the given caption.
The caption will also be used to identify the menu item in the menu event handler.
Parameters:
• caption - menu item caption
4
SwitchFormStatic
Sub SwitchForm(form As Form)
Display a different form.
Parameters:
• form - form to display
Finish
Static Sub Finish()
Terminates this application.
GetPreferenceStatic
Static Function GetPreference(name As String) As Variant
Retrieves the value of a previously stored preference (even from previous of the same
program).
Parameters:
• name - name which was used to store the value under
Returns:
• value associated with name
StorePreference
Static Sub StorePreference(name As String, value As Variant)
5