Apple Newton Utilities Guía de usuario Pagina 275

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 942
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 274
CHAPTER 7
Controls and Other Protos
Time Protos 7-15
Figure 7-22 A protoNewSetClock view
The protoSetClock time proto also displays an analog clock with which the
user can set a time value. Although this proto is still available for use, it has
been updated to the
protoNewSetClock, which you should use instead.
The protoAMPMCluster time proto displays A.M. and P.M. radio buttons in a
protoNewSetClock view. For more information about the slots and methods
for this proto, see “protoAMPMCluster” (page 6-44) in Newton Programmers
Reference. Figure 7-23 shows an example of a
protoAMPMCluster view.
Figure 7-23 A protoAMPMCluster view
Implementing a Simple Time Setter 7
To implement a time setter, dene your template with the proto that you want
to use, specify the initial time value to show in the clock, and dene the
TimeChanged method. You might also need to define additional slots or messages,
as described in “Time Protos” (page 6-38) in Newton Programmers Reference.
The following example is a template that uses
protoDigitalClock to allow the
user to specify a time:
clock := {...
_proto: protoDigitalClock,
time: 0,
TimeChanged: func()
begin
// add your code to respond to time change
print(time);
end,
Vista de pagina 274
1 2 ... 270 271 272 273 274 275 276 277 278 279 280 ... 941 942

Comentarios a estos manuales

Sin comentarios