Apple Newton Utilities Guide de l'utilisateur Page 663

  • 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 662
CHAPTER 18
Intelligent Assistant
Using the Assistant 18-17
Based on the denition above, you can derive a my_other_action template that
holds the value
'my_action in its isa slot, as in the following example:
my_other_action := {
// name of this action
value: "my other action",
// subclass of 'dyna_user_action
isa: 'my_action,
// words matching this action
lexicon: ["leap", "lunge"]
}
You can take a similar approach to dene your own target object types by placing
the
'dyna_user_obj symbol in your target template’s isa slot. For example,
you can dene a template
my_target that is a dyna_user_obj and use its
symbol in this slot also, as in the following code fragment:
my_target := {
value: "my target" // name of this target
isa: 'dyna_user_obj // must use this value
}
Based on the denition above, you can derive another target template from
my_target, and store the value 'my_target in its isa slot, as in the following
example:
my_other_target := {
value:"my other target",// name of this targe
isa: 'my_target, // subclass of 'dyna_user_obj
}
Implementing the PostParse Method 18
Your PostParse method implements the behavior your application provides
through the Assistant. This method resides in the
PostParse slot of your
task template. It is called after all the templates in the
signature slot have
been matched.
Your
PostParse method must provide any behavior required to complete the
specied task, such as obtaining additional information from the
ParseUtter
result frame as necessary, and handling error conditions.
Vue de la page 662
1 2 ... 658 659 660 661 662 663 664 665 666 667 668 ... 941 942

Commentaires sur ces manuels

Pas de commentaire