Apple Newton Utilities Podręcznik Użytkownika Strona 770

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 942
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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.
Przeglądanie stron 769
1 2 ... 765 766 767 768 769 770 771 772 773 774 775 ... 941 942

Komentarze do niniejszej Instrukcji

Brak uwag