Apple Newton Utilities Guide de l'utilisateur Page 154

  • 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 153
CHAPTER 4
NewtApp Applications
4-16 Using NewtApp
Use code similar to the following example to set the allSoups slot:
allSoups:=
{ IOUSoup: {_proto: newtSoup,
soupName: "IOU:PIEDTS",
soupIndices: [
{structure: 'slot,
path: 'title,
type: 'string},
{structure: 'slot,
path: 'timeStamp,
type: 'int},
{ structure: 'slot,
path: 'labels,
type: 'tags }
],
soupQuery: {type: 'index, indexPath:
'timeStamp},
soupDescr: "The IOU soup.",
defaultDataType: '|BasicCard:sig|,}
}
Using the Layout Protos 4
Each NewtApp Application requires exactly two layouts: a default layout,
displayed when the application is opened, and an overview layout, displayed when
the Overview button is tapped.
The NewtApp framework layout proto you choose for your default view, sets up
your application as either a card-, roll-, or page-style application.
Unique slots in the layout protos include:
masterSoupSlot
forceNewEntry
The
masterSoupSlot is the most important. It contains a reference to the
application soup in the
newtApplication.allSoups slot, from which the
layout gets its data.
The forceNewEntry slot allows your application to deal gracefully with
the situation created when someone opens a folder that is empty. If the
forceNewEntry slot is set to true in that situation, an entry is automatically
created. Otherwise, an alert slip announces that there are no
items in this list,
Vue de la page 153
1 2 ... 149 150 151 152 153 154 155 156 157 158 159 ... 941 942

Commentaires sur ces manuels

Pas de commentaire