background image
C H A P T E R 7
Controls and Other Protos
7-14
Time Protos
ChangedSlider: func()
begin
SetVolume(viewValue);
:SysBeep();
end,
...}
The example above initializes the slider gauge to indicate the current system
volume, which it retrieves from the user configuration that is maintained by the
Newton System Software. The range of allowable volume values is from
0
(the default for
minValue
) to
4
.
Whenever the user moves the slider and lifts the pen, the
viewValue
slot is
updated and the
ChangedSlider
method is called. In the example, the
ChangedSlider
method resets the system volume to the new value chosen by
the user and sounds a beep to provide the user with audible feedback.
For more information on the
protoSlider
and the
ChangedSlider
method,
see "protoSlider" (page 6-33) in Newton Programmer's Reference.
Time Protos
7
You can use the time protos to allow the user to set time and date values. There are
four time protos:
The
protoDigitalClock
time proto displays a digital clock with which the
user can set a time value. For more information about the slots and methods for
this proto, see "protoDigitalClock" (page 6-38) in Newton Programmer's
Reference
. Figure 7-21 shows an example of a
protoDigitalClock
view.
Figure 7-21
A
protoDigitalClock
view
The
protoNewSetClock
time proto displays an analog clock with which the
user can set a time value. For more information about the slots and methods for
this proto, see "protoNewSetClock" (page 6-40) in Newton Programmer's
Reference
. Figure 7-22 shows an example of a
protoNewSetClock
view.
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна