Apple Newton Utilities Guide de l'utilisateur Page 499

  • 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 498
CHAPTER 11
Data Storage and Retrieval
Using Newton Data Storage Objects 11-67
changeSym parameter, the change notification is not sent, but the function or
method does everything else its description species.
Sometimes it may not be not desirable to send notications immediately after
making each change to a soup; for example, when changing a large number of soup
entries, you might want to wait until after you’ve nished making all the changes to
transmit notication messages. You can use the
XmitSoupChange global function
to send soup change notications explicitly, as shown in the following code example:
// assume cursor and destSoup are valid
// xmit a single notification after all changes are made
while e := cursor:Entry() do EntryCopyXmit(e,destSoup,nil);
XmitSoupChange("mySoup:mySig", '|MyApp:MySig|, 'whatThe, nil);
The rst argument to the XmitSoupChange function species the name of the
soup that has changed and the second argument species the application making
the change. The third argument is a predened symbol specifying the kind of
change that was made, such as whether an entry was added, deleted, or changed.
Where appropriate, the nal argument is change data, such as the new version of
the entry that was changed. Because this particular example makes multiple
changes to the
destSoup soup, it passes the 'whatThe symbol to indicate
unspecied changes, and passes
nil as the change data. For a more detailed
discussion of change type and change data, see the section “Callback Functions for
Soup Change Notication” (page 9-14) in Newton Programmers Reference.
Soup change notication messages are sent on a deferred basis. In most situations,
this implementation detail has no practical impact; however, you should be aware
that soup change messages are not sent until after the method that sends them
returns. For example, if your
ButtonClickScript method causes a soup
change, the change notication message is not sent until after the
ButtonClickScript method returns.
Vue de la page 498
1 2 ... 494 495 496 497 498 499 500 501 502 503 504 ... 941 942

Commentaires sur ces manuels

Pas de commentaire