home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 4 / AACD04.ISO / AACD / Programming / CanDo / Decks3 / RexxWindows / RexxWindows.docs < prev   
Encoding:
Text File  |  1990-10-24  |  1.9 KB  |  36 lines

  1. RexxWindows:
  2.   by James Nelson, Technical Support, INOVAtronics
  3.  
  4.   This is an example of communication between two CanDo decks.  Both decks,
  5. RexxWindow1 and RexxWindow2, are almost identical, except they refer to the
  6. other in their scripts.
  7.   To run this example, the two decks must be in the same directory, but can
  8. be run from a CLI or from the WorkBench.  Only one of them needs to be run
  9. by the user, as the other deck will be started automatically.
  10.   The first thing you will see when you run one of the RexxWindow's is that
  11. it will indicate that it is polling for the other RexxWindow.  This means that
  12. it has run the other deck, but that it is waiting for the ARexx port to
  13. become available.  Once the other deck is started, it will send a greeting
  14. message to the first deck.
  15.   Each deck consists of a Document Object and a Field Object.  Type a message
  16. into either Field and then press the RETURN key.  The message will be sent
  17. to the other deck, and that deck's Field will become active.  You may then
  18. type into that Field and send a message back to the other deck.
  19.  
  20. About the Decks:
  21.  
  22.   The first script of interest when studying either deck is the AfterStartUp
  23. script.  It contains code examples of: 1) Finding a deck's directory,
  24. 2) Running a Rexx Server, 3) Waiting for the Rexx Server to become active,
  25. with a TimeOut to prevent an infinate wait.
  26.   Messages are sent within the routine "SendTheText".  This routine
  27. takes the text from Field#1, and then uses the SendMessage command with
  28. NORESULTS.
  29.   Messages are received in two ARexx Objects.  The first receives the
  30. messages which were sent by the other decks, "SendTheText" routine; the
  31. second waits for a "quit" command from the other deck -- which allows
  32. the decks to be shut down if either of them is shut down (see the
  33. CloseWindow Event.)
  34.   I hope this provides a foundation for ARexx communications between
  35. multiple applications.
  36.