Apple Newton Utilities Betriebsanweisung Seite 468

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 942
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 467
CHAPTER 11
Data Storage and Retrieval
11-36 Using Newton Data Storage Objects
After creating the new soup entry, these methods transmit a soup change
notication message. To suppress the soup change notication message that -
Xmit
functions and methods transmit, pass
nil as the value of their changeSym
argument. For more information, see “Using Soup Change Notication” beginning
on page 11-63; also see the descriptions of the
AddToDefaultStoreXmit and
AddToStoreXmit methods in “Soup Functions and Methods” (page 9-35) in
Newton Programmers Reference.
Normally the member soups in a union are created automatically by the system as
needed to save frames as soup entries. If you need to force the creation of a union
soup member on a specied store without adding an entry to the new member soup,
use the
GetMember union soup method to do so. For more information, see the
description of this method in “Soup Functions and Methods” (page 9-35) in
Newton Programmers Reference.
Adding an Index to an Existing Soup 11
Normally, applications create an index for each slot or set of slots on which a soup
may be searched frequently. Although the soup’s indexes are usually created along
with the soup itself, you may occasionally need to use the
AddIndexXmit method
to add an index to an already existing soup and transmit a soup change notication
message. Indexes must be added individually—you can’t pass arrays of index specs
to the
AddIndexXmit method.
W ARNING
You cannot query a union soup on an index that is not present in
all its member soups. Sending the
AddIndexXmit message to a
union soup adds the specied index to all soups currently
available to the union; however, any soup introduced to the union
subsequently has only its original complement of indexes, which
may not include the index this method added. Similarly, any
member soup created by the system has only the indexes specied
by its soup denition, which may not include the index this
method added.
The following code fragment adds an index to the "mySoup:myApp" union soup,
enabling queries to search for integer data in that soup’s
mySlot slot:
// get my union soup
local myUSoup := GetUnionSoupAlways("mySoup:mySig");
// add a new single-slot index on the'mySlot slot
local myISpec := {structure:'slot, path:'mySlot, type:'int};
local myUSoup:AddIndexXmit(myISpec,'|myApp:mySig|);
Seitenansicht 467
1 2 ... 463 464 465 466 467 468 469 470 471 472 473 ... 941 942

Kommentare zu diesen Handbüchern

Keine Kommentare