Apple Newton Utilities Uživatelská příručka Strana 154

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 942
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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,
Zobrazit stránku 153
1 2 ... 149 150 151 152 153 154 155 156 157 158 159 ... 941 942

Komentáře k této Příručce

Žádné komentáře