C H A P T E R 1 9
Built-in Applications and System Data
though that the list of cities and countries is not necessarily the same on your
Newton device and the user of your application. Your application should also check
string names for cities and countries entered by the user.
function performs an additional search based on the
class of the string passed in. This is done in order to take into account the language
of the ROM used; the symbols are all in English. To set the class of a string, use the
function, described in Chapter 20, "Localizing Newton
The frame returned by the
function is the same as the
newCityFrame parameter to the
function described in "Adding a City to
a Newton Device" beginning on page 19-29. For information on the frame returned
function see the description of this function in Newton
Adding a City to a Newton Device
The Time Zones
method adds a city to a Newton device. It takes a
newCityFrame parameter which is a frame with the following slots:
Required. A string containing the name of the location.
Required. The longitude of the location. The formula for
generating this value appears in "Using Longitude and
Latitude Values" beginning on page 19-30.
Required. The latitude of the location.
Required. The offset in minutes from Greenwich Mean Time.
Required. A symbol representing the country in which the
city is located.
Optional. A string for the area code of the location.
Optional. A string for the region of the location. For cities
in the U.S. this should be the state; for cities in Canada
Optional. A string for the airport designation for the city, or
an array of strings if the city is served by multiple airports.
Here is an example of such a frame: