C H A P T E R 1 1
Data Storage and Retrieval
Using Newton Data Storage Objects
11-29
You can use the
EntryUndoChangesXmit
function to undo the changes to the
soup entry if you have not yet written the cached entry back to the soup. Because
this function throws away the contents of the entry cache, referencing a slot in the
entry after calling the
EntryUndoChangesXmit
function causes entry data to be
read into the cache again.
Most applications unregister their soup definitions when they are closed or
removed. To facilitate the automatic creation of soups when the user files or moves
soup entries in the Extras drawer, you may want your soup definition to remain
registered while your application is closed--to unregister only when your
application is removed, call the
UnRegUnionSoup
function from your application
(
form
) part's
DeletionScript
function.
The following code example uses the
UnRegUnionSoup
function to unregister a
soup definition. Because a single application can create multiple soups and soup
definitions, soup definitions are unregistered by name and application symbol:
// usually in your app part's DeletionScript fn
UnRegUnionSoup("mySoup:mySig",'|MyApp:MySig|);
Using Stores
11
Because the system manages stores automatically, most NewtonScript applications'
direct interaction with store objects is limited. This section describes the use of
system-supplied functions and methods for
getting store objects
retrieving packages from stores
testing stores for write protection
getting and setting store information
Procedures for manipulating other objects that reside on stores (such as soups,
store parts and virtual binary objects) are described in "Using" sections for each of
these objects; for detailed information, see "Using Soups" on page 11-32; "Using
Virtual Binary Objects" on page 12-8; and "Using Store Parts" on page 12-12.
Store Object Size Limits
11
The system imposes a hard upper limit of 64 KB on store object sizes for any kind
of store. SRAM-based stores impose a further limitation of 32 KB on block size.
Trying to create an entry larger than 32 KB causes the system to throw
|evt.ex.fr.store|
exceptions. These limits apply to the encoded form the
data takes when written to a soup, which varies from the object's size in the
NewtonScript heap.