Apple Newton Utilities Guide de l'utilisateur Page 770

  • 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 769
CHAPTER 21
Routing Interface
21-22 Using Routing
// which takes targetInfoFrame.target and makes an
// alias, if appropriate
end,
TextScript: func(item,target) begin . . . end,
...
};
Note that one application can have multiple frame formats. You would simply
supply a different
SetupItem method for the different formats (as well as unique
symbol and title slots), to construct the item frame differently.
If your frame format doesn’t support the
'text data type, you should override the
dataTypes slot and set it to ['frame].
For routing formats that support the
'text data type, you must override the
default
TextScript method that obtains the string data, if there are no data
denitions for the data that contain their own
TextScript method.
For more information about the slots and methods provided by this proto, see
“Routing Format Protos” (page 18-9) in Newton Programmers Reference.
Creating a New Type of Format 21
You create a new type of routing format by using protoRoutingFormat. This is
the base routing format, which serves as a proto for the other routing format protos.
Here is an example of a format based on this proto:
MyNewFormat := {
_proto: protoRoutingformat,
dataTypes: ['binary],
symbol: '|myFormat:SIG|,
title: "Custom",
SetupItem: func(item, targetInfoFrame) begin
call kMyFunkySetup with (item, targetInfoFrame);
end,
...
};
For more information about the slots and methods provided by this proto, see
“Routing Format Protos” (page 18-9) in Newton Programmers Reference.
Providing Application-Specic Routing Actions 21
First, to provide the Action button in the user interface of your application, you
must include a view based on the
protoActionButton proto. For details, see
protoActionButton (page 18-7) in Newton Programmers Reference.
Vue de la page 769
1 2 ... 765 766 767 768 769 770 771 772 773 774 775 ... 941 942

Commentaires sur ces manuels

Pas de commentaire