Apple Newton Utilities Betriebsanweisung Seite 479

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 942
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 478
CHAPTER 11
Data Storage and Retrieval
Using Newton Data Storage Objects 11-47
Sending the Reset message to the cursor positions it at the rst valid entry in
index order. In this case, the rst entry is
"noun" because the entries are sorted in
descending alphabetical order.
The
GoToKey cursor method steps through the set of valid entries in index order
until it nds the rst entry having a specied key value. If the specied key value is
not found, this method returns the next valid entry found after the specied index
position. Thus, sending the
GotoKey("az") message to this cursor returns the
value
"axe" because it’s the rst valid entry that appears in the index after the
unoccupied
"az" position.
Sending the
GotoKey("a") message to this cursor returns the value nil because
this message positions the cursor beyond the end of the range of valid entries
dened by the query that generated the cursor.
Figure 11-7 illustrates that specifying a
beginExclKey value of "b" excludes
from consideration every entry beginning with a letter that comes after
"b" in the
reverse alphabet; that is, this
beginExclKey value causes the valid range of
entries to include only entries beginning with
"a". As a result, sending the
GotoKey("n") message causes this cursor to return the value "axe" because it
is the rst valid entry appearing in the index after the
"n" position.
Note
The sort order for symbol-based indexes is the ASCII order of the
symbol’s lexical form. This sorting behavior is made available in
NewtonScript by the
SymbolCompareLex global function.
Figure 11-7 Specifying ends of a descending index
Querying on Multiple-Slot Indexes 11
Before reading this section, you should understand the contents of “Querying on
Single-Slot Indexes” beginning on page 11-39.
Descending key order
beginExclKey cursor:GoToKey("n");
Valid subrange
Z "noun" "name" BN "axe" "able" A
Seitenansicht 478
1 2 ... 474 475 476 477 478 479 480 481 482 483 484 ... 941 942

Kommentare zu diesen Handbüchern

Keine Kommentare