Apple Newton Utilities Guia do Utilizador Página 463

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 942
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 462
CHAPTER 11
Data Storage and Retrieval
Using Newton Data Storage Objects 11-31
for such stores. Do not use the global function IsReadOnly to test store objects;
use only the
IsReadOnly store method for this purpose.
Getting or Setting the Default Store 11
The default store is that store designated by the user as the one on which new data
items are created. Normally, applications using union soups do not need to get or
set the default store. The system-supplied functions that accept union-soup
arguments handle the details of saving and retrieving soup data according to
preferences specied by the user.
If for some reason you need to get or set the default store yourself, you can utilize
the
GetDefaultStore and SetDefaultStore global functions.
Note
Do not change the default store without
rst notifying the user.
Getting and Setting the Store Name 11
Normal NewtonScript applications rarely need to get or set store names. A store’s
name is the string that identies the store in slips displayed to the user. The default
name for the internal store is “Internal” and a PCMCIA store is named “Card” by
default. The store methods
GetName and SetName are used to get and set the
names of stores.
The following example uses the
GetName method to obtain a string that is the
name of the internal store:
//returns the string "Internal"
GetStores()[0]:GetName();
Before attempting to set the store’s name or write any other data to it, you can use
the store methods
IsReadOnly or CheckWriteProtect to determine whether
the store can be written.
W ARNING
Renaming a store renders invalid all aliases to entries residing on
that store. See “Using Entry Aliases” on page 12-7.
Accessing the Store Information Frame 11
Each store may hold an optional information frame that applications can use to
save information associated with the store itself. Note that unless an application
stores data in this frame, it may not exist on every store.
The
GetInfo and SetInfo store methods are intended for use by backup/restore
applications only; most applications need not use them at all. The
GetInfo store
Vista de página 462
1 2 ... 458 459 460 461 462 463 464 465 466 467 468 ... 941 942

Comentários a estes Manuais

Sem comentários