home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / pocketbk / developmen / oplexamp / README.TXT < prev    next >
Text File  |  1992-08-27  |  5KB  |  129 lines

  1. Hello psion/series3
  2.  
  3. Here are some OPL programs, stolen from the manual. Most of them are
  4. for reference - to remind you how something odd is done - or for use
  5. as the foundations of other programs. Some of them are useless,
  6. really. Have a look at them before you waste precious SSD space.
  7.  
  8. A few are hacked versions of old MC or Organiser programs, as can be
  9. seen in their less-than-perfect User Interfaces.
  10.  
  11. I cart them around on a subdirectory of \OPL, to stop the System
  12. screen going berserk.
  13.  
  14. In late 1991 I did a slightly revised version of the Programming
  15. Manual. It contained four/five new programs, all of which are
  16. included in this ZIP. They are EX_ANIMA, EX_ALARM, EX_LABEL, and
  17. EX_CIRC1/EX_CIRC2. Documentation for these is included in this file.
  18.  
  19. There are two other programs in here:
  20.  
  21.     ORG2AGN converts LZ diaries to Series 3 format (I think Jamie may
  22.     already have sent this up)
  23.  
  24.     EX_DTMF dials a DTMF number.
  25.  
  26.  
  27. I've taken to adding the following into the odd piece of
  28. documentation, and here seems a good place too:
  29.  
  30.     Psion PLC disclaims any liability for any damage or loss arising
  31.     directly or indirectly from the use of the products described herein.
  32.  
  33. ...and so do I.
  34.  
  35. Please tell me if any of this is useful, or if there's something else
  36. you want which I might be able to lay my hands on.
  37.  
  38. Nick Healey
  39. 29/1/92
  40.  
  41.  
  42.  
  43. EX_ANIMA: animation example
  44. ===========================
  45.  
  46. This program requires five bitmap files - one.pic to five.pic. (This
  47. version gets them from the Psion logo in the ROM.) A better example
  48. would have each of the 5 differing slightly - they might, for example,
  49. be five `snapshots' of a running human figure, each with the legs at
  50. a different point in their cycle.
  51.  
  52. The program copies each bitmap into a window of its own, then makes
  53. each window visible in turn, each time slightly further across the
  54. screen.
  55.  
  56. To make bitmap files, first draw the pattern you want with any of the
  57. graphics drawing commands. (Use gLINEBY 0,0 to draw single dots.)
  58. When the pattern is complete, use gSAVEBIT to make the bitmap file.
  59.  
  60.  
  61. EX_LABEL: inserting a new line in a database
  62. ============================================
  63.  
  64. If you insert a new label in a database, the entries will no longer
  65. match up with the labels. To save having to use the `Update' option
  66. on every entry, to insert a suitable blank line in each one, you can
  67. use this program to do this for the entire data file.
  68.  
  69. The Database allows you to use as many lines (fields) as you want in
  70. an entry (record); OPL can only access 32 fields. This program only
  71. lets you insert a new field in the first 16 fields, although you can
  72. adapt the program simply to check up to 31 fields.
  73.  
  74. If, in the Database, you enter a line longer than 255 characters, it
  75. is stored as two fields. This program correctly handles any such fields.
  76.  
  77. The program checks that the 17th field is blank, as it will be
  78. overwritten by what was the 16th field. If a long entry has a 17th
  79. field, and it contains text, the program skips this entry. The rest
  80. of longer entries - even if there are more than 32 fields - will be
  81. unchanged.
  82.  
  83. If you insert a new field at a position below the last label, the
  84. Database will not show it, even when using `Update'.
  85.  
  86. The maximum record length in OPL is 1022 characters. The OPEN command
  87. will raise a `Record too large' error if the file contains a record
  88. longer than this.
  89.  
  90.  
  91. EX_CIRC1/EX_CIRC2: circles
  92. ==========================
  93.  
  94. These are two example programs for drawing circles - the first hollow,
  95. the second filled.
  96.  
  97.  
  98. EX_ALARM: Alarm example - IOA to ALM:
  99. =====================================
  100.  
  101. The ALM: device provides access to alarms. When writing
  102. to it with IOW or IOA, you can use these two functions:
  103.  
  104. *) function=1 - only the date (and no time) is shown on the screen
  105. when the alarm rings - e.g. Thu 5 Sep
  106.  
  107. *) function=2 - the day and time are shown - e.g. Thu 11:54
  108.  
  109. In either case, you must pass these two arguments:
  110.  
  111. *) An array of 2 long integers - the first is the time for the alarm
  112. to go off, and the second is the time for which it is due. Both are
  113. given in seconds since midnight a.m. on 1/1/1970.
  114.  
  115. *) A message, as a ZERO-TERMINATED string of up to 64 characters.
  116.  
  117. This procedure asks for the information for an alarm, and sets it (as
  118. type 2 - day and time to be shown when the alarm rings). If you press
  119. the Time button, and this is the next alarm to ring, it is shown as a
  120. `RunOpl' alarm.
  121.  
  122. Use this as a whole program itself - do NOT call it from another
  123. procedure.
  124.  
  125. The Series 3 allows up to 20 alarms to be pending. If you run this 
  126. program more than once, you should always allow for four Time alarms, 
  127. and one for each Agenda file you use.
  128.  
  129.