home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 3 Comm / 03-Comm.zip / tt2man.zip / ttdde.doc < prev    next >
Text File  |  1993-12-13  |  6KB  |  109 lines

  1.  
  2.                              TABLE OF CONTENTS                              
  3.  
  4.  
  5.           G. Appendix G - Dynamic Data Exchange (DDE)
  6.  
  7.  
  8.  
  9.  
  10.  
  11.         G. Appendix G - Dynamic Data Exchange (DDE)         
  12.  
  13.  
  14. Dynamic  Data Exchange (DDE) is a standardized protocol for exchanging  data
  15. and commands  between applications running under the  Presentation  Manager.
  16. TalkThru  supports DDE as both a client and a server using commands  in  the
  17. AUTOPILOT  script language.  A discussion on the AUTOPILOT  Statements  used
  18. for DDE  is in the Chapter, AUTOPILOT Statements By Category and the  syntax
  19. for the Statements is in the Chapter, AUTOPILOT Statement Reference.   Refer
  20. to these  chapters  when  you  wish to  code  a  DDE  application  utilizing
  21. AUTOPILOT.  You may also refer to the sample scripts provided with  TalkThru
  22. named TTSERVER.SCR and TTCLIENT.SCR.
  23.  
  24. The information  described below provides a general overview of DDE, how  it
  25. is structured,  and the features supported through the  AUTOPILOT  language.
  26. This  information  will be necessary in understanding the  AUTOPILOT  syntax
  27. you will use.
  28.  
  29. DDE conversations  always  take place between a client and  a  server.   The
  30. client  starts a conversation and makes requests of the server.  The  server
  31. only  responds to client requests.  A single AUTOPILOT script can be both  a
  32. client and a server.
  33.  
  34. A DDE  conversation  is  identified by Application and  Topic  names.   Data
  35. passed  between  the  client  and server is  identified  by  an  Item  name.
  36. Application  name uniquely identifies the server application. A  server  may
  37. recognize several topics and several Items within a single Topic.  A  server
  38. application  may  be  engaged   in    a  conversation  with  several  client
  39. applications  at  the same time.  A client application may be engaged  in  a
  40. conversation with several servers and/or topics at the same time.
  41.  
  42. To conduct a DDE conversation, the client and server need to agree upon  the
  43. Application,  Topic, and Item names. The following section  describes  these
  44. names in greater detail.
  45.  
  46. Application
  47.  An Application  name is the name of the server from which data is  desired.
  48.  If TalkThru  is the server, the Application name is defined in  the  server
  49.  script.   If TalkThru is the client, the server program will  document  the
  50.  Application  name it will respond to.   For example, Microsoft  Excel  uses
  51.  EXCEL as an Application name.
  52.  
  53. Topic
  54.  A Topic  is  a  logical  data context. For  applications  that  operate  on
  55.  file-based  documents,  topics   usually      are  file  names;  for  other
  56.  applications,  they  are application specific strings.  In  addition,  most
  57.  servers  support a "SYSTEM" topic which provides a context for  information
  58.  that  may  be of general interest. If TalkThru is the server,  Topic  names
  59.  are defined  by the script.  If TalkThru is the client, the server  program
  60.  will  document the Topic names it will respond to.  For example,  Microsoft
  61.  Excel supports the SYSTEM topic and the file name of any open worksheet.
  62.  
  63. Item
  64.  An Item  name  identifies a particular data object that is used  in  a  DDE
  65.  transaction.    If TalkThru is the server, Item names are  defined  by  the
  66.  script.   If TalkThru is the client, the server program will  document  the
  67.  Item  names it will respond to. For example, Microsoft Excel uses  an  Item
  68.  name of "R1C1" to refer to the first cell in a worksheet.
  69.  
  70. Once  a  conversation is established, the client  application  controls  the
  71. flow  of the conversation by requesting various transactions.  A client  can
  72. issue four types of  transactions:  REQUEST data from a server, POKE  (send)
  73. unsolicited  data  to  a server, ask the server to EXECUTE  a  command,  and
  74. establish  an  advise  link  with    a  server  where  the  client  receives
  75. notification  (WARM_LINK)  or data (HOT_LINK) from the server  each  time  a
  76. specified data item changes.
  77.  
  78.  
  79. REQUEST Transaction
  80.  A client  can  ask  a server to supply a specific data item  by  issuing  a
  81.  REQUEST  transaction  for  a specific Item name.   For  example,  a  client
  82.  application  could  obtain the contents of the  row 1 column 1 cell  in  an
  83.  Excel worksheet by issuing  a REQUEST transaction for Item "R1C1".
  84.  
  85.  
  86. POKE Transaction
  87.  A client  can  supply a server with an unsolicited data item by  issuing  a
  88.  POKE  transaction  for  a  specific  Item  name.   For  example,  a  client
  89.  application  could  change the contents of the row 2 column 5  cell  in  an
  90.  Excel spreadsheet by issuing a POKE transaction for item "R2C5".
  91.  
  92.  
  93. ADVISE Transactions
  94.  There  are two types of advise transactions: HOT_LINK and WARM_LINK.  In  a
  95.  hot link,  when  the data item changes, the server  immediately  sends  the
  96.  changed data value to the client.  In a warm link, the server notifies  the
  97.  client  that  the value of the data item has changed, but the  server  does
  98.  not actually  send  the data value until the client requests  it  (using  a
  99.  REQUEST transaction).
  100.  
  101.  
  102. EXECUTE Transaction
  103.  A client  can instruct a server to perform a command by issuing an  EXECUTE
  104.  transaction. For example, a client could instruct Excel to open a  specific
  105.  worksheet  by issuing an EXECUTE transaction  for  '[OPEN("C:\NAME.XLS")]'.
  106.  A server  application will document the commands that it will  respond  to.
  107.  If  TalkThru  is  the  server, the commands that it  will  respond  to  are
  108.  defined in the server script.
  109.