Apple Newton Utilities Guide de l'utilisateur Page 229

  • 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 228
CHAPTER 6
Pickers, Pop-up Views, and Overviews
Overview Protos 6-29
The picker denition (described in the next section) is a data denition frame that
is provides the routines to create a name reference from an entry, an entry alias,
another name reference, a straight frame, or just to create a canonical empty name
reference (if no data is provided). It also retrieves the data from a name reference.
Finally, it provides some information about the name reference to support actions
like tapping and highlighting.
You also need to dene the soup to query. Both this and the query specication can
be dened either in the data denition or in the list picker.
Using the Data Denitions Frame in a List Picker 6
The pickerDef slot of the list picker holds a data denition frame that determines
the overall behavior of the list picker. This frame should be based on
protoNameRefDataDef or protoPeopleDataDef, or at should least support
the required slots.
Here is an example:
pickerDef:= {
_proto: protoNameRefDataDef,
name: "Widgets",
class: '|nameRef.widget|,
entryType: 'widget,
soupToQuery:"Widgets",
querySpec: {indexPath: 'name},
columns: kColumns,
};
Specifying Columns 6
The columns slot hold an array that determines how the columns in the list picker
are displayed. Here’s an example of column specication array:
columns:= [{
fieldPath:'name,// path for field to display in column
optional:true,// not required -- unnamed widget
tapWidth:155},// width for checkbox & name combined
{
fieldPath:'price,// path for field to display
in column
optional:nil,// price is required
tapWidth:0}];// width -- to right end of view
Vue de la page 228
1 2 ... 224 225 226 227 228 229 230 231 232 233 234 ... 941 942

Commentaires sur ces manuels

Pas de commentaire