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

  • 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 660
CHAPTER 18
Intelligent Assistant
Using the Assistant 18-15
Using the Assistant 18
This section describes how to make an application behavior available through the
Assistant, as well as how to display online help from the Assistant. This material
presumes understanding of the conceptual material provided in previous section.
Making Behavior Available From the Assistant 18
You need to take the following steps to make an application behavior available
through the Assistant:
1. Create an action template for your primary action. If necessary, create additional
action templates that dene subtasks of the primary action.
2. Create zero or more target templates. (Some actions require no target; others
may use system-supplied target templates.)
3. Implement your
PostParse method.
4. Create a task template.
5. Register and unregister your task template with the Assistant at the
appropriate times.
The sections immediately following describe these tasks in detail.
It is recommended that you begin by dening the action and target templates
required to complete the primary action. After doing so, you will have a better idea
of the tasks your
PostParse method needs to handle. After creating all the
necessary templates and writing a suitable
PostParse method, dening the task
template itself is likely to be a trivial chore.
Dening Action and Target Templates 18
Action templates and target templates are simply frames that contain a specied set of
slots and values. You need to dene templates for all the actions and targets required
to complete a task. One of the action templates must dene the primary action.
Take the following steps to dene an action template or a target template:
1. Dene a frame containing the
value, isa and lexicon slots.
2. Assign the frame to a slot or variable that is the name of the template.
3. Place in the
value slot a string that identies the action or target that this
template denes.
4. If the template denes an action, place the symbol
'dyna_user_action in its
isa slot. If the template defines a target, place the symbol 'dyna_user_obj
in its
isa slot.
Zobrazit stránku 660
1 2 ... 656 657 658 659 660 661 662 663 664 665 666 ... 941 942

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

Žádné komentáře