Apple Newton Utilities Betriebsanweisung Seite 840

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 942
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 839
CHAPTER 23
Endpoint Interface
23-12 Using the Endpoint Interface
Receiving Data Using Input Specs 23
The most common way to receive data is to use input specs. An input spec is a
frame that denes what kind of data you are looking for, termination conditions
that control when the input should be stopped, and callback methods to notify you
when input is stopped or other conditions occur.
An input spec consists of many pieces. It contains slots that dene
the type of data expected (form slot)
the input target for template and binary data (target slot)
the data termination conditions (termination slot)
protocol ags for receiving data (rcvFlags slot)
an inactivity time-out (reqTimeout slot)
the data lter options (filter slot)
the options associated with the receive request (rcvOptions slot)
a method to be called when the termination conditions are met
(
InputScript method)
a method to be called periodically to check input as it accumulates
(
PartialScript method, partialFrequency slot)
a method to be called if the input spec terminates unexpectedly
(
CompletionScript method)
Table 23-2 summarizes the various input data forms and the input spec slots that
are applicable to them. Input spec slots not included in the table apply to all data
forms. For more details on the input spec frame, see “Input Spec Frame”
(page 20-11) in Newton Programmers Reference.
After you’ve connected or accepted a connection, you set up your rst input spec
by calling
SetInputSpec. When one input spec terminates, the system
automatically posts another input spec for you when the
InputScript method
dened in the previous input spec returns. This new input spec duplicates the
one that just terminated. If you don’t want this to happen, you can call the
SetInputSpec method from within the InputScript method of your input
spec to change the input spec or terminate the input. Pass
nil to SetInputSpec
to terminate the input.
You also use the
SetInputSpec method if you need to set up an input spec at
some other point. Note that if you want to terminate a current input spec to set up a
new one, you must call the
Cancel method before calling SetInputSpec with
your new spec. (This applies inside an
InputScript that is called as a result of
calling the
Input method.)
Seitenansicht 839
1 2 ... 835 836 837 838 839 840 841 842 843 844 845 ... 941 942

Kommentare zu diesen Handbüchern

Keine Kommentare