Apple Newton Utilities Guía de usuario Pagina 704

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 942
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 703
CHAPTER 19
Built-in Applications and System Data
19-30 Notes
areaCode: "503",
region:"OR",
airport:"PDX"}
Using Longitude and Latitude Values 19
To calculate the latitude or longitude of a location, create and use the
following function:
CalcLngLat := func(dgrs, min, secs, westOrSouth) begin
local loc;
loc := dgrs / 180 + min / (180 * 60) + secs
/ (180 * 60 * 60);
loc := rinttol(loc * 0x10000000);
if westOrSouth then
loc := 0x20000000 - loc;
loc;
end;
The built-in utility functions LatitudeToString and LongitudeToString
return a string representation of an encoded integer latitude or longitude value. For
information on these functions see Newton Programmers Reference.
Setting the Home City 19
The SetLocation method sets the home city. It takes a single parameter
whichCity which is the same as the newCityFrame parameter of the
NewCity
method; see “Adding a City to a Newton Device” beginning on page 19-29. The
following code makes Los Angeles the home city:
GetRoot().worldClock:SetLocation( GetCityEntry
("Los Angeles") [0] );
Notes 19
This section describes the Notes API. The Notes application uses three types of
stationery: regular notes, checklists, and outlines. Figure 19-6 shows a note and a
checklist; an outline (not shown) is like the checklist without the checkboxes.
Vista de pagina 703
1 2 ... 699 700 701 702 703 704 705 706 707 708 709 ... 941 942

Comentarios a estos manuales

Sin comentarios