Apple Newton Utilities Guide de l'utilisateur Page 470

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 942
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 469
CHAPTER 11
Data Storage and Retrieval
11-38 Using Newton Data Storage Objects
This approach provides the following benets:
It prevents your application from inadvertently damaging another
application’s data.
It helps your application avoid name conicts with other applications’ slots.
It prevents soups from becoming cluttered with excessive numbers of entries.
It facilitates removal of your application’s data.
Note that when you makes changes to other applications’ soups you should
transmit notication of the changes by means of the mechanism described in
“Using Soup Change Notication” beginning on page 11-63.
Adding Tags to an Existing Soup 11
You can add tags only to a soup that has a tags index. To add new tags to a soup
that already has a tags index, simply add to the soup an entry that uses the new
tags—the tags index is updated automatically to include the new tags.
Adding a tags index to an existing soup is like adding any other kind of index:
simply pass the appropriate index spec to the soup’s
AddIndexXmit method.
Remember, however, that the system allows only one tags index per soup. If you try
to add another tags index to that soup, you’ll replace the original tags index. It’s
quite easy to add new tags to a soup that already has a tags index, so you’ll rarely
need to replace a soup’s tags index.
Using Queries 11
To retrieve soup entries, you need to query a soup or union soup object by sending
the
Query message to it. The Query method accepts a query specication frame,
or query spec, as its argument. The query spec species the characteristics that
soup entries must have in order to be included in the query result.
Note
For instructional purposes, this section describes each item that
may appear in a query specication separately. Normally, a single
query spec denes multiple criteria that soup entries must meet to
be included in the results of the query; for example, you can
create a single query spec that species tests of index key values,
string values, and tags.
This section describes how to perform various queries to retrieve soup data. It
includes examples of
simple queries on index values, tags, or text
the use of ascending and descending indexes
Vue de la page 469
1 2 ... 465 466 467 468 469 470 471 472 473 474 475 ... 941 942

Commentaires sur ces manuels

Pas de commentaire