Apple Newton Utilities Guide de l'utilisateur Page 907

  • 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 906
APPENDIX
Run-Time Results A-3
Figure A-1 Declare example
Calculator
Display
Display
{
preallocatedContext:
'Display
.
.
}
Calculator
As a result of the declare, two
slots are added to the Calculator
template. The
Display slot will
eventually hold the address of the
Display view.
In the Calculator view, the
address of the newly created
Display view is stored in the
slot whose name matches the
first entry in the
stepAllocateContext
array in the Calculator
template.
Also as a result of the declare,
one slot is added to the Display
template. It holds the name of the
slot in the Calculator template
where its view address will be
stored.
Later, when the Display view is to
be shown, the system finds the
preallocated view by using the
preallocatedContext slot
(in the template) and looking for a
slot with that name in the Calculator
view. That slot holds the address of
the preallocated Display view.
Templates (compile time) Views (run time)
{
_proto:
Display: Display
.
.
}
{
Display:
nil
stepAllocateContext:
['Display, Display]
.
.}
When the
Calculator view
is opened, this
Display view is
preallocated.
{
_proto:
.
.
}
Vue de la page 906
1 2 ... 902 903 904 905 906 907 908 909 910 911 912 ... 941 942

Commentaires sur ces manuels

Pas de commentaire