The Alarm provides a mechanism which notifies a user when a specified time and date have arrived. Once the Alarm has been set, the alarm notification will be received at the specified time and date even if the Alarm component's module is not currently loaded. On some devices, the alarm may even cause the device to power up if it is off when the specified date and time occur.
If the Alarm is enabled when the program's module is unloaded or the device shuts down, then the module's module_goTo( ) routine will be called when the Alarm triggers. If the Alarm is not enabled when the program's module is unloaded or the device shuts down, then the Alarm will forget its alarm date and alarm time; the value of all its properties will be lost.
Applications should use Alarms sparingly. A Calendar program, for example, might have only one Alarm component, and have that set to the closest even for which the user desires an alarm. When that event occurs, the Alarm could be set to the next event the user needs to be notified about.
Standard Properties: class, enabled, parent, version
The alarm has no event. When the alarm triggers, the application's module_goTo( ) routine is called with value of the Alarm's moduleContext property passed as the context argument to module_goTo( ). The Alarm's enabled property becomes zero when this happens.
GetAlarmDate( ) AS STRUCT Date
Get date of alarm. The date is returned in a Date structure:
STRUCT Date
year AS integer
month AS integer
day AS integer
END STRUCT
Make sure that you've set the uniqueID property to a non-empty string before invoking this action; otherwise, an error will result.
GetAlarmTime( ) AS STRUCT TimeOfDay
Get time of alarm. The time is represented as a TimeOfDay structure:
STRUCT TimeOfDay
hour AS integer
minute AS integer
second AS integer
END STRUCT
Make sure that you've set the uniqueID property to a non-empty string before invoking this action; otherwise, an error will result.
SetAlarmDate(date AS STRUCT Date)
Set date of alarm.
Make sure that you've set the uniqueID property to a non-empty string before invoking this action; otherwise, an error will result.
SetAlarmTime(time AS STRUCT TimeOfDay)
Set time of alarm.
Make sure that you've set the uniqueID property to a non-empty string before invoking this action; otherwise, an error will result.
A component of this type resides in the system module. It is used to mark the system "busy." While busy, the system will accept no user input.
To make the system "busy" for a few seconds while completing some intense computation, most applications will use code like the following:
system:busy!Enter( )
...intense computation...
system:busy!Leave( )
Applications may create and use their own Busy components.
Standard Properties: class, parent, proto, version.
_busyTotalChanged( self AS busy )
Called whenever busyTotal becomes zero or non-zero, indicating that the busy status needs to be changed. Used by the System Module to know when to display busy status.
Enter( )
This property marks the system as "busy": the system will accept no user input, and may put up some busy indicator, such as an hourglass or wristwatch icon.
If your program is about to carry out some intense computation that will slow down the device for 1 - 4 seconds, warn the user by marking the system busy (and marking the system not busy when done).
REM We're beginning a time-intensive operation, so mark system busy.
system:busy.Enter( )
ComputeAllTotals( )
UpdateAllNumbers( )
REM We're done with the time-intensive operation, so mark system not busy.
system:busy.Leave( )
If you will be slowing down the system for more than four seconds, consider providing feedback to the user so they will know the system hasn't crashed. You might want to give the user some idea of what percent of the task has been completed. You may not want to mark the system busy in these cases: instead, you might want to provide a way for the user to cancel the operation.
Leave( )
Undo the effects of a previous invocation of the Enter( ) action.
A Button is a simple component which generates an event when pressed.
The following looks are available:
Standard Properties: caption, class, enabled, graphic, height, left, look, parent, proto, sizeHControl, sizeVControl, top, version, visible, width.
_pressed( self AS button )
This event is generated when the user clicks the Button.
None
The Choice provides an exclusive choice. If a component has more than one Choice children, at most one may be selected. Note that the List also provides a mechanism for presenting the user with an exclusive choice.
The following looks are available:
Standard Properties: caption, class, enabled, graphic, height, left, look, parent, proto, sizeHControl, sizeVControl, top, version, visible, width.
_changed( self AS choice )
This event is generated when the user
The de-selected Choice generates its event before the selected one.
None.
A Clipboard component monitors the system clipboard. It is used to implement "Edit" menu functionality. There is a clipboard component in the system module. Most applications that need custom Edit menu behavior will interact with this component. For example, to determine whether the current clipboard can be pasted as a string, one would use the following code:
IF system:clipboard!QueryItem("string") THEN
...
END IF
Applications may have their own Clipboard components, useful if you wish to handle its events.
Standard Properties: class, parent, proto, version
_clipboardChanged( self AS clipboard )
This event is called whenever the current clipboard item changes.
_selectionChanged( self AS clipboard )
This event is called whenever the current selection changes.
Copy( )
Tells the component with the active selection to "copy" its selection to the clipboard.
Nothing.
Cut( )
Tells the component with the active selection to "cut" its selection--actually a "copy" followed by a "delete."
Nothing.
Delete( )
Tells the component with the active selection to delete the selected data.
Nothing.
GetItem( format AS string ) AS ...
This action returns the specified format if it is currently available on the clipboard.
Paste( )
Tells the component with the active selection to paste the clipboard data to the selection.
Nothing.
QueryItem( format AS string ) AS integer
This action determines whether the specified format is currently available on the clipboard without actually returning the item.
SetItem( item )
This action sets the current clipboard item to the passed item, in the format implied by the variant type.
The Clipper is a simple view window. It clips drawing of its children to its bounds. The Clipper is a "primitive" component type: it doesn't do much, but if you're working on a heavily customized UI, you'll probably find it useful.
Standard Properties: borderBottom, borderLeft, borderRight, borderTop,
children, class, enabled, height, left, numChildren, parent, proto, sizeHControl,
sizeVControl, tile, tileLayout, tileSpacing, tileHAlign, tileHInset, tileVInset,
tileVAlign, top, version, visible, width.
None.
None.