home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine 1997 / ARCHIVE_97.iso / discs / mag_discs / volume_08 / issue_06 / risc_os / AppGuide < prev    next >
Text File  |  1988-12-12  |  54KB  |  1,121 lines

  1. Applications Authors' Guidelines
  2. ================================
  3.  
  4. 10-Nov-88: WRS: wording changes to description of application directories
  5.                 remarks about setting memory area sizes, esp. the screen.
  6.                 improved remarks about dragging.
  7.                 various small typos corrected.
  8. 10-Nov-88: WRS: misc remark about negative monotonic time added.
  9. 12-Dec-88: WRS:
  10.   Various minor typos corrected.
  11.   Data transfer protocol notes removed to separate document.
  12.   Paragraph about why to use true colours added.
  13.   Paragraph about ADJUST on close icon added.
  14.   Section about data interchange added.
  15.   Remark about errors from Wimp_Poll added.
  16.   Remarks about version numbers rationalised.
  17.   Paragraph about interactive help added.
  18.   Paragraph about graphics printer drivers added.
  19.  
  20. The overall design of the desktop environment within this version of
  21. Archimedes has advanced considerably from Arthur 1.20. Here are various
  22. notes about how the facilities should be used, and the principles that
  23. shaped their design.
  24.  
  25. These notes are of interest to ALL applications authors. Some authors may
  26. feel that they are not interested in window systems and that they are not
  27. appropriate to their particular application. The functionality and
  28. usefulness of the RISC OS desktop is such, however, that they will soon find
  29. most of their users spending most of their time within the desktop
  30. environment. Thus it will have a considerable influence on what typical
  31. users understand.
  32.  
  33. General principles
  34. ------------------
  35.  
  36. CONSISTENCY. What the multi-tasking Wimp emphasises is that applications
  37. work *together* for the user of the machine:
  38.  
  39.    They cooperate in sharing the machine.
  40.    They look harmonious
  41.    Their user interfaces are similar.
  42.    The whole is more important than a single application.
  43.  
  44. When porting applications into the desktop environment, check that they work
  45. well with the existing applications and utilities. Strive to ensure that the
  46. habitual user of the desktop environment and the Welcome Stuite applications
  47. will find your program easy to use, and natural to learn.
  48.  
  49. QUALITY. It is much better to write a small program that does something
  50. simple, and does it well, than a sprawling mass that crashes occasionally.
  51.  
  52. RESPONSIVENESS. Archimedes is an extremely fast machine, and this speed
  53. can be used to make the machine easier to use and more productive. The
  54. system software has been written very carefully so that all of this
  55. performance is delivered to be used by the application, rather than being
  56. swallowed up within the operating system. Fast, smooth scrolling and redraw
  57. are worth striving for as they make effective and productive use of an
  58. application much easier.
  59.  
  60. COLOUR. Covering a wide range of screen modes can seem troublesome when
  61. constructing an application, but allows a wide price-range for the end user,
  62. who can choose between resolution and cost. Animated bright colour graphics
  63. can help make a program easier to understand and to use. Not relying on
  64. screen size allows your program to move easily to new better screens and
  65. modes when they become available.
  66.  
  67. EASE OF USE. This is what window systems are about most of all.
  68. All of the various elements described here are ultimately designed to
  69. make the computer easier and more pleasant to use, over a wide range
  70. of user experience and practice.
  71.   Easy to learn
  72.   Easy to re-learn
  73.   Easy to use productively
  74. These things can conflict with each other, and with other things (e.g.
  75. system cost, program size, program development time, backwards
  76. compatibility). Design is not easy, and not all users agree.
  77.  
  78. Specific features of the Archimedes desktop environment:
  79.  
  80. Pop-up, context-sensitive, hierarchical menus. These provide rapid and
  81. convenient access to a wide selection of commands without continuously
  82. occupying screen space, and represent a considerable step forwards from the
  83. single-level, pull-down menus of other systems.
  84.  
  85. Control of multi-tasking and of memory. The Archimedes desktop envronment
  86. makes it easy to understand which applications are using memory, and how to
  87. get more. The memory-mapping hardware of the Archimedes means that issues
  88. about fragmentation of free space are overcome, compared to some other
  89. task-swapping systems. Desktop utility programs can be loaded and unloaded
  90. at will during the use of a large application, making small utilities
  91. considerably more useful than in other systems (where they often have to be
  92. loaded in at system startup, and cannot then be loaded or unloaded without
  93. resetting the machine).
  94.  
  95. Terminology
  96. -----------
  97.  
  98. Remember that the primary users of RISC OS are users and not programmers:
  99. consistent terminology, and the avoidance of jargon, are important in order
  100. to make RISC OS friendly. Because Archimedes is not totally a desktop machine
  101. some jargon inevitably slips through, but this should always be minimised.
  102.  
  103. Mouse terms:
  104.   press - press a button down
  105.   release - release a button
  106.   click - press and release
  107.   drag - press, move the mouse
  108.   double click - press, release, press, release
  109.   choose - what you do to a menu entry
  110.   type - what you do to keys on the keyboard
  111. It is a common fault to confuse "press" and "click", and to talk about
  112. "selecting" menu entries.
  113.  
  114. Files
  115. -----
  116.  
  117. The model of files and filing systems presented within the RISC OS desktop
  118. is that files are always manipulated by their full path-name, including the
  119. name of the filing system, disc, etc. This gives each file in the system a
  120. unique name. There is no concept of "current directory". Every effort is
  121. made to ensure that people never have to type a full path-name, but they do
  122. have to see and (approximately) understand them.
  123.  
  124. Heavy use is made of the types of files. All files should be typed and
  125. datestamped, rather than being of the load/exec form from the old BBC
  126. world (but be prepared to meet these, and respond correctly).
  127.  
  128. Do not refer to, or rely on, the setting of the current directory.
  129.  
  130. NEVER build absolute drive numbers or absolute file names or absolute
  131. filing system names into your program. Check your program working from
  132. floppy, winchester, and econet, and ensure that installation is easy.
  133.  
  134. See below for rules about loading and saving files in programs.
  135.  
  136. Resource files
  137. --------------
  138.  
  139. Applications in the multi-tasking world are typically represented as a
  140. directory whose name begins with "!". The Filer provides various mechanisms
  141. to help such applications, so that the program and its resources can be
  142. treated as a single unit and installation etc. is easy.
  143.  
  144. Resources of any form can be held within an application directory. If an
  145. application is intended for international use then all textual messages
  146. within the program should be placed in a separate text file, so that they
  147. can be replaced with those of a different language. It may be unhelpful
  148. to read such messages one by one, however, as this forces the user of
  149. a floppy-based system to have the floppy containging the application
  150. permentantly in the disc drive. Error messages should all be read in
  151. when the application starts up, so that producing an error message
  152. does not cause an insert-floppy message to appear first.
  153.  
  154. Resources may also be written by the program during the course of execution.
  155. For instance, if an application has user-settable display options or state
  156. which should be preserved from one invokation of the program to another then
  157. saving it within the application directory means that the user does not have
  158. to worry about separate files containing such data. As a source of
  159. user-settable options this technique is preferable to reading an environment
  160. string, since with the latter system the user has to understand how to set
  161. up a boot file.
  162.  
  163. Some resources are of general interest to more than one program. Typical
  164. examples include fonts, and modules that provide general facilities. Such
  165. resources should be placed in the !System application, whose !Boot sequence
  166. sets a variable <System$Path>, or in a separate application such as !Fonts.
  167. It should be noted that the use of shared resources makes applications
  168. slightly harder to install, so check carefully that error messages are
  169. helpful if the shared resources cannot be located.
  170.  
  171. The rules above may break down for large applications. Some applications
  172. occupy more than one floppy disc, with swapping required during operation.
  173. It is difficult to give precise guidelines for such programs in general
  174. terms, because their requirements vary so widely. The rules above, however,
  175. will be used for many smaller programs and so will be reasonably familiar to
  176. users. Larger programs should be designed and organised to fit within the
  177. same general philosophy, so that users find them easy to install,
  178. understand and operate.
  179.  
  180. The key resource names that are built in to the system are as follows.
  181. The application directory is presumed to be called !Appl in the examples
  182. below.
  183.  
  184. !Appl.!Boot - this is the name of a file which is run when the application
  185. directory is first "seen" by the Filer. It is usually an Obey file (see
  186. documentation on the Obey module). Typical actions include:
  187.  
  188. (1) *IconSprites the !Appl.!Sprites resource file.
  189. This is done automatically if there is no !Boot file.
  190.  
  191. (2) Set a run-type for data files controlled by this application.
  192.  
  193. (2) Set a type name for data files controlled by this application.
  194.  
  195. The Filer only does this if the sprite !appl does not already exist in the
  196. Wimp sprite pool (sprite names are lower case). This prevents repeated
  197. delays from re-executing !Boot files (or even re-examining application
  198. directories). However, it relies on the various applications seen by the
  199. Filer having unique names, e.g. if you have more than one !System directory
  200. then only the first one "seen" will be used.
  201.  
  202. !Appl.!Sprites - this is the name of a sprite file. For an application
  203. directory !Appl this can provide a sprite !appl which should be used by the
  204. Filer, and also a sprite sm!appl for use in small-icon displays. It can also
  205. provide sprites that relate to data files controlled by this application, in
  206. small and large form (using sprite names file_xxx and small_xxx, with xxx
  207. being the hex identity of the file type). See below for rules about the
  208. appearance of sprites.
  209.  
  210. !Appl.!Run - this is the name of a file which is run when the application
  211. directory is double-clicked. It is usually an Obey file. Typical actions
  212. include:
  213.  
  214. (1) Execute !Boot - this will usually have been done already, but in the
  215. presence of multiple applications with the same name the !Boot file of
  216. a different one may have been seen first.
  217.   Example:   Run <Obey$Dir>.!Boot
  218.  
  219. (2) Call *Wimpslot to ensure that there is enough memory free to start the
  220. application.
  221.   Example: *Wimpslot 150K 150K
  222. Many applications know exactly how much memory they should be loaded with,
  223. and manage to acquire more memory (often without the knowledge of the
  224. language system underneath) by calling SWI Wimp_SlotSize. Paint/Draw/Edit
  225. all maintain shifting heaps above the initial startup limit, ensuring that extra
  226. memory is always given back to the central system when it is not needed.
  227. Applications can also arrange to have the user control dynamically how
  228. much memory they should have, by dragging the relevant bar in the Task Manager
  229. display.
  230.  
  231. (3) If system resources are used then ensure that System$Path is defined,
  232. and produce a clean error message if it is not.
  233.   Example: If "<System$Path>" = "" Then Error System resources cannot be found
  234.  
  235. (4) Ensure that any soft-loaded modules are present that the application
  236. requires, using *RMEnsure.
  237.   Examples:
  238.             RMEnsure SharedCLibrary 0 RMLoad System:modules.CLib
  239.             RMEnsure ColourTrans 0.10 RMLoad System:Modules.Colours
  240.             RMEnsure ColourTrans 0.10 Error You need ColourTrans 0.10 or later
  241. If your call to RMEnsure can load a module from outside your application
  242. directory then you should call it twice, to ensure that the newly loaded
  243. module is indeed recent enough.
  244.  
  245. (5) Loading a module cannot steal memory from the "next" slot set up by
  246. wimpslot, so the memory set up by the *WimpSlot will still be valid - that
  247. is why *WimpSlot must be called before loading modules (e.g. in case all of
  248. free memory is in the next slot when the process starts). However, some
  249. applications wish to ensure that there is also some "free" memory after they
  250. have loaded, for example if they use the shifting heap strategy outlined in
  251. (2). Such applications may now at this point call *WimpSlot again, with a
  252. slightly smaller slot setting, to leave just the right amount in the next
  253. slot while at the same time ensuring that there is some memory free.
  254.  
  255. (6) Set an environment variable from <Obey$Dir> If you wish to access any
  256. other resources at run-time. This will give you the full path-name of your
  257. resource directory.
  258.  
  259. (7) Run <Obey$Dir>.!RunImage. This is the conventional name of the  actual
  260. program. It is also used by the Filer to provide the datestamp of an
  261. application in full-info mode.
  262.  
  263. It should be emphasised that the presence of multiple applications with
  264. the same name should be thought of as an unusual case, but should not cause
  265. anything to crash. Also, complain cleanly if your resources can no longer
  266. be found after program startup.
  267.  
  268. There are, of course, variations on this startup sequence. It's quite common
  269. to bundle up existing applications so that they have an icon, and start neatly
  270. from the desktop environment. When doing this, note that it's possible to
  271. set the sizes of other memory areas in the machine using OS_ChanageDynamicArea.
  272. One point to note here is that the screen must not be allowed to grab memory
  273. from the "Next" slot - this can cause a crash. It is easily avoided by setting
  274. the next slot to 0 while setting up screen mode etc., e.g. see the startup
  275. sequence for !Lander which sets the next slot to 0 before setting the screen
  276. mode.
  277.  
  278. Memory
  279. ------
  280.  
  281. In a multi-tasking environment, memory should be used sparingly. Most simple
  282. applications require a fixed amount of memory, which can be arranged using a
  283. !Run file that specifies exactly the right *WimpSlot size.
  284.  
  285. Applications with more complex requirements can arrange to call
  286. Wimp_SlotSize at run-time to take (and give back) memory. Basic programs
  287. may use the new END= construct. C programs should call Wimp_SlotSize
  288. directly, the language run-time library (and malloc) will be entirely
  289. unaware that this is happening and so you must organise the extra memory
  290. yourself. A common way of doing this is to provide a shifting heap in which
  291. only large blocks of variable size data live. By performing shifting on this
  292. memory, pages can be given back to the Wimp when documents are unloaded.
  293.  
  294. DO NOT RECONFIGURE THE MACHINE. DO NOT KILL OFF MODULES IN ORDER TO
  295. GET MORE WORKSPACE. Such sequences are quite likely to be hardware-dependent
  296. and OS-version-dependent.
  297.  
  298. 305 owners who wish to upgrade to RISC OS are warned that they should
  299. upgrade to 1MB machines first.
  300.  
  301. Graphics
  302. --------
  303.  
  304. Programs should work in all screen modes in which the Wimp works. Read the
  305. current screen mode rather than setting it when your program is loaded, and
  306. read system variables to obtain resolution, aspect ratio etc.  instead of
  307. building these into the program. Use Wimp_SetColour rather than GCOL (or
  308. ColourTrans, see below). At the very least, the program should not crash in
  309. inappropriate modes, but should display a message in your window, e.g.
  310. "256-colour mode only", as appropriate. Mode 0 is not usually useful, but
  311. worth making work if you possibly can, for users with big monochrome screens
  312. (mode 23). Also, try a square pixel mode (e.g. mode 9). Also check in modes
  313. 13, 15, 16, 18, 19, 20.
  314.  
  315. Think of an OS-unit as being a constant unit of measurement, rather than a
  316. fraction of the width of the screen (as was the model in the old BBC world).
  317. The standard assumption is that there are 180 OS-units to the inch, even
  318. though this may in fact vary between physical screens. "device-independent"
  319. should be interpreted as meaning "the same absolute size in any mode" rather
  320. than "the same number of pixels" or "the same fraction of the screen".
  321.  
  322. Do not change the palette, but read and use the existing one.
  323.  
  324. Mode 16 is highly non-square, i.e. the aspect ratio is wrong. Do
  325. not try to correct for this automatically, it is an inevitable consequence
  326. of trying to fit a great deal of text onto a standard monitor.
  327.  
  328. There is a broadcast when the mode changes, so any mode-specific data can be
  329. changed at that point. Programs uninterested in colours must also check
  330. operation in 256-colour modes, e.g. some XOR-ing tricks do not work quite
  331. the same. For instance, the Wimp paints the caret (using XORing so that it
  332. can be easily unpainted again) with Wimp colour 11 (red) XOR'd with the
  333. colour code for Wimp colour 0 (white). This ensures that it always appears
  334. red when on a white background.  The Clock application uses a similar trick
  335. for the second hand of the clock. As another example, Edit uses XORing with
  336. Wimp colour 7 to indicate its selection, but uses redraws in 256-colour
  337. modes.
  338.  
  339. In 2-colour modes the Wimp uses ECFs (dot patterns) for Wimp colours 1-6
  340. (grey levels). Note that certain XOR-ing tricks do not work on these, and
  341. that use of Wimp_CopyBlock can cause alignment problems for the patterns.
  342.  
  343. Many programs choose to render graphics in "true" colours, and use the
  344. current palette to give as close an approximation as possible to the colour
  345. they intend. This approach to colour has the enormous benefit that it is not
  346. tuned to the limitations of today's hardware. The palette utility produces
  347. another broadcast when the user changes the palette settings, allowing such
  348. programs to repaint for the new palette. A soft-loaded module called
  349. ColourTrans is available (used by Paint and Draw) to give the closest
  350. setting possible to a given RGB value.
  351.  
  352. When should an application use true colours, and when should it use Wimp
  353. colours? As a general rule, any colours stored in documents and used when
  354. printing, should be true colours. Wimp colours are a convenient selection of
  355. contrasting colours for use when you don't really care what actual colours
  356. get used, as long as the result looks pleasant. True colours should be used
  357. whenever an object's colour really matters. The colours stored in Draw
  358. files, for instance, are true colours because the file has a precise meaning
  359. (of an image rendered on an abstract device) regardless of the current
  360. screen or palette settings.
  361.  
  362. The graphics printing facilities provided with RISC OS are based on the
  363. assumption that the same code should be used for redraw as for printing.
  364. There are various limitations in the printer drivers, all of which
  365. constitute good practice when writing to the screen too. Note that as a
  366. general rule, the use of the Draw module instead of Plot codes for line and
  367. area graphics means that a much better model of device-indpendent graphics
  368. is available.
  369.  
  370. A technique used on some systems is to remember the bitmap behind a menu or
  371. dialogue box when popping it up, to make removing it faster. This is not
  372. possible in a multi-tasking world because a window from a separate task may
  373. be changing in background. Rather than doing this, concentrate on making
  374. redraw FAST. One available technique for this is to use sprites to remember
  375. the contents of a window which are difficult to redraw quickly.
  376.  
  377. Another important technique for speeding redraw is the use of source-level
  378. clipping. During redraw and update, the Wimp always informs the application
  379. program of the current clipping rectangle. The redraw of icons, and of
  380. objects in Draw, is fast because this rectangle is used as a rapid test
  381. for the rejection of many redraw operations.
  382.  
  383. Do not use the system sprite pool in product programs, build a user one. The
  384. system sprite pool is present in Archimedes for backwards compatibility with
  385. the Master, and to help the construction of very simple programs.
  386.  
  387. Some program developers feel very strongly that a program should be able to
  388. take over the entire screen, without any scroll bars etc. It is perfectly
  389. possible for a program to do this and still benefit from the multi-tasking
  390. environment, as long as this is treated as a speicific mode of operation
  391. (chosen by a menu entry saying "Fill screen", for instance), and the program
  392. can also operate in a window. This facility can easily be implemented by
  393. opening a window the size of the screen, on top of all others. Some programs
  394. may even have special properties that only operate when in this mode, e.g.
  395. animation implemented using direct writing to the screen. The desire for
  396. this mode of operation, however, should not (alone) lead you to abandon the
  397. multi-tasking world entirely.
  398.  
  399. The Mouse
  400. ---------
  401.  
  402. The mouse has three buttons, called SELECT (left), MENU (middle) and ADJUST
  403. (right).
  404.  
  405. When a "selection model" is being used for a set of objects, the
  406. button actions should follows those of the Filer, Edit and Draw,
  407. namely:
  408.   SELECT is used to make an initial selection
  409.   ADJUST is used to toggle elements in and out of this selection
  410.     (talk about "adjusting" the selection)
  411. This is the origin of the names for the buttons.
  412.  
  413. Always use SELECT as the "primary" button of the mouse, used for pointing at
  414. things, dragging etc. ADJUST is used for less common or less obvious
  415. functions, or for slight variations and speedups. If you have no useful
  416. separate operation in any particular context, then make ADJUST do nothing
  417. rather than duplicating the functionality of SELECT: this is all part of
  418. training the user to use SELECT first.
  419.  
  420. Another technique for speedups and variations on mouse operations is to
  421. look at the setting of the shift key when the mouse event occurs. Such
  422. combinations should never be "necessary" to the operation of a program,
  423. e.g. a user experimenting with your program should not be expected to
  424. try all such combinations.
  425.  
  426. The Wimp detects double-clicks, typically used to mean "open object". It
  427. should be noted that a double click causes a single-click event to be sent
  428. to the program first. Some other systems avoid this, which may appear to
  429. simplify the task of programming but leads to reduced responsiveness to
  430. mouse operations.
  431.  
  432. Menus
  433. -----
  434.  
  435. Menus are accessed via the middle mouse button, referred to as MENU.
  436.  
  437. As a general rule an application should provide a single menu tree within a
  438. window, rather than a collection of little menus that require the user to
  439. point at a specific place in the window before pressing MENU. The problem
  440. with the latter approach is that it is hard for the user to determine the
  441. complete set of commands available.
  442.  
  443. (Aside: this is known as the "closure" principle. The user should be able
  444. to guess what your program can do, and discover fairly rapidly what it
  445. can't do, without having to search everywhere for hidden menus etc.)
  446.  
  447. It is reasonable for entries in the menu to be context-sensitive. In general
  448. such portions of the menu depend either on the object indicated when MENU is
  449. clicked (e.g. in the Paint file window), or on a "selected" object or
  450. objects (e.g. in Edit).
  451.  
  452. Standard colours for menus:
  453.  
  454.   title is black(7) on grey(2)
  455.   body is black on white(0)
  456.   items 44 OS-units high
  457.   no separation between items
  458.   text is left-justified (except for keyboard equivalents, see "Keystrokes")
  459.  
  460. The title says "Appl" (the application name) rather than "Appl Menu". Entries
  461. have initial letters capitalised and are in lower case otherwise.
  462.  
  463. Try not to make non-leaf menus too wide: reducing the horizontal travel
  464. necessary helps rapid selection in nested menus. Open the menu initially 64
  465. OS-units to the left of the actual click, in order to aid this.
  466.  
  467. Do not grey out non-leaf menus. This helps the user to understand
  468. the complete set of operations available at any time.
  469.  
  470. Click on a non-leaf should have no effect (other than removing the menu
  471. tree) or should duplicate functionality that is available elsewhere.
  472.  
  473. Clicking SELECT or MENU on a menu entry should should choose the
  474. current menu item, closing the menu tree.
  475.  
  476. Clicking ADJUST on a menu entry should cause the relevant action to be
  477. performed, but the menu to remain. Flags, ticks, grey items etc. on the menu
  478. tree should reflect the new state after the action being performed. This is
  479. achieved in the following way. On a menu click, the application should call
  480. Wimp_GetPointerInfo and decide if ADJUST is being held down. If it is,
  481. re-open the same menu structure at the same location, and the Wimp will
  482. ensure that exactly the same positions are assumed by the various levels of
  483. the menu. This rule should only be broken if the object being referred to is
  484. destroyed by the action of the menu click.
  485.  
  486. (Note that you should call Wimp_GetPointerInfo BEFORE doing the operation
  487. chosen by the user from the menu, but the menu re-opening must be done AFTER
  488. the operation, so that any flags have been updated.)
  489.  
  490. Clicking outside the menu tree results in the menu being closed before the
  491. click event occurs. This allows the user to ignore the menu tree if no menu
  492. operation is required. To cancel the menu tree, the user clicks on the
  493. background. ESC also cancels the menu tree.
  494.  
  495. Menus produced from the icon bar should be moved up a little before opening,
  496. so that the relevant menu bar entry is still visible. The base of the menu
  497. should be 96 OS-Units from the bottom of the screen. The menu should
  498. be horizontally aligned so that the left hand edge of the menu is 64 OS-Units
  499. to the left of the point where the mouse click occurred.
  500.  
  501. Keyboard equivalents should be shown on the menu items for which they are
  502. short cuts. See the section named "Keystrokes".
  503.  
  504. Dialogue Boxes
  505. --------------
  506.  
  507. The simplest way to provide dialogue boxes is as leaves of the menu tree. If
  508. the necessary windows are permanently created and linked to the menu data
  509. structure, then the Wimp will handle all opening and closing automatically.
  510. Alternatively, the menu tree can be so arranged that the application is
  511. informed when the dialogue box is being opened, this allows any computed data
  512. to be delayed until the last minute. For a large program with many dialogue
  513. boxes this is preferable, as the Wimp has a limit on the number of windows in
  514. existence between all tasks.
  515.  
  516. This form of dialogue box can be visited by the user without clicking on mouse
  517. buttons, just like traversing other parts of the menu tree. This is possible
  518. because redraw on Archimedes is typically much faster than on previous
  519. systems, so popping up the dialogue box and then removing it does not cause a
  520. significant delay.
  521.  
  522. Colours for dialogue boxes:
  523.  
  524.   title is black (7) on grey (2)
  525.   title highlight colour is grey (2)
  526.   body is black (7) on grey (1)
  527.   writable fill-in fields are black (7) on white (0), with a border.
  528.   action buttons are black (7) on cream (12), with a border.
  529. Dialogue boxes match the colouring of menus, to show that they are "part of
  530. the menu tree".
  531.  
  532. Dialogue boxes do not have close boxes.
  533.  
  534. Provide a dialogue box that fully identifies the program, version etc. that
  535. is running. This is usually at the very top of the menu tree, e.g. the first
  536. leaf of the first branch. The leaf-name "Info" should be used to identify this
  537. within the menu tree, and the title "About this program" should be used
  538. for the dialogue box. See later remarks about program versions.
  539.  
  540. If a menu operation leading to a dialogue box has a keyboard shortcut,
  541. Wimp_CreateMenu should be used to initially open the dialogue box rather
  542. than Wimp_OpenWindow (athough Wimp_OpenWindow should still be used in
  543. response to Wimp_Poll (OpenWindowRequest). This will ensure that it has the
  544. same behaviour concerning cancellation of the operation etc. as when
  545. accessed through the menu tree.
  546.  
  547. There are various common forms of icon that occur within dialogue boxes,
  548. the most common forms are described here to improve consistency
  549. between applications.
  550.  
  551. Writable Icons
  552. --------------
  553.  
  554. Writable icons are used for various forms of textual fill-in field. They
  555. provide filter strings so that specific characters can be forbidden,
  556. alternatively arbitrary filtering code can be added to the application to
  557. ensure that only legal strings (within this particular context) are entered.
  558.  
  559. A writable icon should have a black border and a white background.
  560.  
  561. Code should be added to the handling of each dialogue box for the following
  562. keystrokes. It's not possible for the Wimp to do this, because it doesn't
  563. know the right ordering to use.
  564.  
  565. down-arrow: move to the next writable icon within the dialogue box,
  566. or to the first if currently at the last.
  567.  
  568. up-arrow: move to the previous writable icon within the dialogue box,
  569. or to the last if currently at the first.
  570.  
  571. RETURN: move to the next writable icon within the dialogue box, or perform
  572. the default "GO" operation for this dialogue box if currently within the last
  573. writable icon.
  574.  
  575. When moving to a new writable icon, the caret should be placed at the
  576. end of the existing content of the icon.
  577.  
  578. Action Icons
  579. ------------
  580.  
  581. This term refers to "buttons" on which the user clicks in order to cause
  582. some event to occur, typically the event for which the parameters have just
  583. been entered in the dialogue box.
  584.  
  585. An action icon should have black (7) writing, a border, and cream (12)
  586. background.
  587.  
  588. The best icon to use is button type 7 ("menu"), with ESG not zero.
  589. This will cause the button to invert when the pointer is over it (like
  590. a menu item).
  591.  
  592. It is sometimes appropriate to provide keyboard equivalents for action
  593. buttons. For instance, if the dialogue box is available via a function key
  594. as well as on the menu (see "Keystrokes") then adding key equivalents for
  595. action icons may mean that the entire dialogue box can be driven from the
  596. keyboard. A conventional use of keys is:
  597.  
  598. RETURN in the last writable icon. Go, perform the obvious action initiated
  599. by filling in this dialogue box.
  600.  
  601. ESCAPE. Cancel the operation, remove the dialogue box. Note that ESCAPE is
  602. dealt with by the Wimp automatically in this case.
  603.  
  604. Function keys F1, F2, F3. If the action icons are arranged positionally
  605. at the top or bottom of the icon in a simple row, then define F1... as
  606. positional analogues of the action buttons, e.g. F1 activates the
  607. left-most one, F2 the next, etc.
  608.  
  609. Option Icons
  610. ------------
  611.  
  612. This term refers to "switches", which can either be on or off.
  613.  
  614. The best icon to use is a text-and-two-sprites one. The text is
  615. left-justified and has the validation string "soptoff,opton" with the optoff
  616. and opton sprites within the default Wimp pool. This generates a box to the
  617. left of the text, with a star within it if the option is on (e.g. the icon
  618. is selected). The button type is 11.
  619.  
  620. Radio Icons
  621. -----------
  622.  
  623. This term refers to a set of options where exactly one out of a set of
  624. icons can be set.
  625.  
  626. The text-and-two-sprites form is again best, using the sprites "radiooff"
  627. and "radioon" from the default Wimp pool, and an ESG to force exclusive
  628. selection.
  629.  
  630. Static Dialogue Boxes
  631. ---------------------
  632.  
  633. A static dialogue box is opened using Wimp_OpenWindow rather than
  634. Wimp_CreateMenu. A static dialogue box matches normal ones in colours, but
  635. has a close box.
  636.  
  637. One common form of use is a "tool" dialogue box. This typically consists
  638. entirely of action icons, and is used in preference to a submenu because the
  639. typical mode of use is of rapid switching between the tool box and the
  640. pointer. An example is the colour and tool windows in Paint. These are
  641. activated (for a given sprite) using menu entires "Show colours" and
  642. "Show tools".
  643.  
  644. Another reason to use a static dialogue box is that it may be appropriate
  645. to attach menus to a dialogue box.
  646.  
  647. Another reason is that it's not possible to drag an icon into a normal
  648. dialogue box from another application, because as soon as the drag starts
  649. the menu tree is cancelled (see the sections on loading and saving files).
  650.  
  651. Keystrokes
  652. ----------
  653.  
  654. When you gain the caret, do not automatically pop above other windows in the
  655. stack. Also, a window should generally only gain the caret if the user
  656. clicks inside it - the exceptions being menus and dialogue boxes, which
  657. should give the caret back to the previous owner when they close - this is
  658. done automatically by the Wimp for menus and non-static dialogue boxes.
  659.  
  660. If you receive a keystroke that you do not understand or use, hand it back
  661. to the Wimp using Wimp_ProcessKey. This allows other windows to provide
  662. hot-key operations that work anywhere, it also allows the Wimp to do
  663. function key expansion in the last resort.
  664.  
  665. Keyboard speedups for menu operations are useful to expert users. Reminders
  666. of their existence should be placed right-justified in the relevant menu
  667. entry, as in the following examples:
  668.  
  669.      (ctl-X)           control character
  670.      (f3)              function key
  671.      (shf-f3)          shifted function key
  672.      (ctl-f3)          control function key
  673.      (ctl-shf-f3)      control shifted function key
  674.      (ctl-alt-shf-f3)  most complex example: control, alt and shift
  675.  
  676. Use function keys for most speedups. use ^Z, ^X, ^C and ~V for
  677. operations that refer to a "selected" object or objects:
  678.  
  679.     ctl-Z        clear selection
  680.     ctl-X        delete selection
  681.     ctl-C        copy selection
  682.     ctl-V        move selection
  683.  
  684. This allows the expert right-handed user to access these operations
  685. extremely rapidly.
  686.  
  687. Use ALT as a shifting key rather than as a function key. Different forms of
  688. international keyboards have standardised the use of ALT for the entering of
  689. accented characters.
  690.  
  691. Do not forbid the use of top-bit-set characters in your program, and many
  692. standard accented characters are available there. These characters are
  693. clearly distinguished from the function keys by the Wimp.
  694.  
  695. Due to their frequent polling of the Wimp, window'd programs do not normally
  696. need to use escape conditions. The Wimp sets the escape key to generate an
  697. ESC character. If you perform a long calculation without calling Wimp_Poll,
  698. you may set the escape action of the machine to set escape conditions (using
  699. *FX 229,0), as long as you set it back again (using *FX 229,1 and then *FX
  700. 124) before calling Wimp_Poll.
  701.  
  702. Version Numbers
  703. ---------------
  704.  
  705. Significant applications typically have an Info box of a standard format,
  706. that gives the version number of the application being used. Provide it at
  707. the top of the menu in the icon for your program. Copy closely the form of
  708. dialogue box used in the Welcome Suite applications.
  709.  
  710. Very small applications need not have this, but all programs should also be
  711. identifiable by a version number on the first line of their !Run file.
  712.  
  713. Editors
  714. -------
  715.  
  716. An editor is a program that presents files of a particular format as
  717. abstract objects which the user can load, edit, save, and print. Text
  718. editors, word processors, spreadsheets, draw programs are all editors in
  719. this context. Their data files are referred to as documents.
  720.  
  721. Each document being edited is typcially displayed in a window. Such
  722. windows are referred to as "editor windows".
  723.  
  724. Most editors, for each document currently being edited, record whether
  725. the user has made any adjustments yet to the document. This is known
  726. as an "modified flag".
  727.  
  728. The title of an editor window is conventionally the filename of the current
  729. document, centred, with a postfix " *" if modified. The minimum size can be
  730. set to ensure that this does not restrict the window's minimum size.. Use
  731. "<untitled>" if the document has not yet been saved or loaded. If there are
  732. multiple views of the same document then postfix " %n" to this, where %n
  733. is the number of views of this document that exist.
  734.  
  735. Standard editor window colours:
  736.   title fore is black (7)
  737.   title back is 2
  738.   title hilight is 12             (input focus indication)
  739.   scroll outer is 3
  740.   scroll inner is 1
  741.  
  742. Some editors are capable of editing several documents of the same type
  743. concurrently, while others can edit only one object at a time. Being able
  744. to edit several documents is frequently useful, and removes the requirement
  745. for multiple copies of the program to be loaded. Such programs are
  746. referred to here as multi-document editors. Edit, Draw and Paint
  747. are all multi-document editors, while MusicEd and FormEd are not.
  748.  
  749. Editors use RISC OS file types to distinguish which application belongs to which
  750. file. Their !Boot files should give a name, a sprite (in the Wimp sprite
  751. pool) and a run action to such file types. File types are allocated by Acorn
  752. ISV support.
  753.  
  754. The user interface of RISC OS concerning loading and saving documents is
  755. rather different from other systems, because of the permanent availability of
  756. the Filer windows. This means that there is no need for a separate
  757. "mini-Filer" which presents access to the filing system in a cut-down way.
  758. Although this may feel unusual at first to experienced users of other
  759. systems, it soon becomes natural and helps the feeling that applications are
  760. working together within the machine, rather than as separate entities.
  761.  
  762. The Icon bar
  763. ------------
  764.  
  765. Icons on the icon bar represent facilities and services available within the
  766. computer that are offered by currently running applications. Some of these
  767. directly represent hardware devices or filing system access points, these go
  768. on the left of the icon bar. The rest are purely software services, and go
  769. on the right. Each application is typically represented by just one icon.
  770.  
  771. When an editor is loaded it registers an icon on the icon bar. This icon is
  772. typically the same as the one used to represent the application within the
  773. Filer.
  774.  
  775. An editor typically needs two (related) icons: one for data files, one for
  776. the application. The latter is used for the application in the Filer.
  777. Clicking this usually creates a blank data object, or opens the current one
  778. if your program can only edit one at a time.
  779.  
  780. Normal size for file icons, and for things on the icon bar:
  781.   68 OS-units high
  782.   68 OS-units wide
  783. Icons with a different height are strongly discouraged, as they will have
  784. their top edges aligned within the filer "large icon" display. A wider icon
  785. is permissable, but the size above should be thought of as "standard". If
  786. the width is greater than 160 OS-units then the edges will not be displayed
  787. in the filer "large icon" display.
  788.  
  789. Icons are often displayed half size to save screen space. Hand-tuned
  790. small versions of icons are usually provided.
  791.  
  792. Check the appearance of icons in 2, 4, 16 and 256 colour screen modes. Do
  793. not assume that your customers have a MultiSync monitor. Note that icons
  794. must not be defined in 256-colour modes (the Wimp can't cope).
  795.  
  796. Icons for files conventionally have a black border 4 OS-units wide. Icons
  797. for devices conventionally have a grey (5) outline and cream (12) body.
  798. Icons for applications are conventionally not square (thus requiring a mask)
  799. and related in some way to the documents files that they edit.
  800.  
  801. Starting an Editor
  802. ------------------
  803.  
  804. The standard ways of starting an editor are:
  805.  
  806.   Either:
  807.     Double-click on the application icon within the Filer
  808.   Or:
  809.     Double-click on a document icon within the Filer
  810.  
  811. The action taken in the first case is to load a new copy of the application.
  812. The only visible effect to the user is that the application icon
  813. appears on the icon bar.
  814.  
  815. The action in the second case is to load a new copy of the application,
  816. to register its icon on the icon bar, to load the specified document
  817. and to open a window onto the document. This effect typically occurs by the
  818. activation of the run-type of the document file, which in turn will invoke
  819. the application by name with the pathname of the document file as its single
  820. argument.
  821.  
  822. Newly opened windows on documents should be horizontally centred in a
  823. mode-12 screen, and not occupying the entire screen. This emphasises that
  824. the application does not replace the existing desktop world, but is merely
  825. added to it. Subsequent windows should not totally obscure ones that this
  826. application has already opened, e.g. use a small offset with each new
  827. window.
  828.  
  829. The action in the second case is modified if a multi-object editor of the
  830. correct type is already loaded. In this case, the existing application
  831. will notice the broadcast from the Filer that a double-click has occured,
  832. and will open a window on the document itself. For details, see the Data
  833. Transfer Protocol documentation.
  834.  
  835. A further way of opening an existing document is to drag its icon from the
  836. Filer onto the icon representing the editor. In this case, a data load
  837. message is sent by the Filer to the editor, which can edit the file. This
  838. form is important because it specifies the intended editor precisely, for
  839. instance if both Paint and FormEd are being used (both can edit sprite
  840. files) then double-clicking on a sprite file could load into either.
  841.  
  842. Creating new documents
  843. ----------------------
  844.  
  845. In a multi-document editor, clicking on the editor icon on the icon bar
  846. creates a new, blank document in a newly opened window. If arguments are
  847. required in creating a new document, it may also be appropriate to use a
  848. dialogue box during the course of this process. If a style sheet is required
  849. (e.g. for a DTP program) then it may be appropriate to use a static dialogue
  850. box, and drag the style sheet from the Filer.
  851.  
  852. The window created from the loading or creation of a document should
  853. be no larger than the windows created by Edit, and should be in the same
  854. position on the screen. Stagger further new windows down by 48 OS-units
  855. for each new window, but if this would overlap the icon bar then return
  856. to the original starting size and position. The initial size and position
  857. of windows should be user-configurable, by setting a window in a template
  858. file.
  859.  
  860. In a single-document editor, clicking on the editor icon on the icon bar
  861. creates a new, blank document if there is not already a document loaded. If
  862. there is already a document loaded, this moves the document window to the
  863. front of the window stack, in case it has been obscured by other windows.
  864.  
  865. Editing existing documents
  866. ------------------------
  867.  
  868. To open an existing document, double-click on the document in the Filer.
  869. This will cause a broadcast from the Filer when it's about to open
  870. something, so if your editor can edit multiple documents it can catch this
  871. broadcast and load the document into the existing editor.
  872.  
  873. To insert one document into another, drag the icon for the file to be
  874. inserted into the open window of the target document. The Filer will then
  875. send a message to that window, giving the type and name of the file dragged.
  876. The target (if the file is of a type that can be inserted) can now read
  877. the file. If the file is not of a type that can be inserted in this document
  878. then the editor should do nothing, e.g. no error message is produced.
  879.  
  880. Saving documents
  881. ----------------
  882.  
  883. To save a document, provide a dialogue box as follows.
  884.  
  885. -------------------------------------
  886. |                                   |
  887. |              Save as:             |
  888. |                                   |
  889. -------------------------------------
  890. |                                   |
  891. |       - - - - - - -               |
  892. |       |                           |
  893. |                   |               |
  894. |       |                           |
  895. |           sprite  |               |
  896. |       |                           |
  897. |                   |               |
  898. |       - - - - - - -               |
  899. |                                   |
  900. |  ---------------------    ------  |
  901. |  |    <writable>     |    | OK |  |
  902. |  ---------------------    ------  |
  903. |                                   |
  904. -------------------------------------
  905.  
  906. The dialog box consists of a sprite icon, a writable icon, and an action
  907. icon. The exact dimensions should be copied from the palette utility. The
  908. writable icon should have the caret at the end. More options may be added if
  909. necessary, as appropriate to the document type in question.
  910.  
  911. This is the standard equivalent of the "minifinder" in other systems. If
  912. there is no file name then invent a simple leaf name, e.g. TextFile in
  913. Edit, so that just dragging will not cause an error.
  914.  
  915. The user can now:
  916.  
  917. (1) hit RETURN or click on OK to save in the already named file
  918.     (clicking on the menu entry that leads to this dialogue box
  919.      should have the same effect).
  920. (2) edit the filename as desired using the keyboard
  921. (3) drag the icon into a directory viewer.
  922. (4) hit ESCAPE to cancel the operation
  923.  
  924. (1) is used when saving an already saved document. (3) is used when
  925. specifying a destination directory for the save. (2) is used when editing
  926. the leaf-name of the file. Typically, it is necessary to do (2) and (3) when
  927. first saving a file, and (1) thereafter.
  928.  
  929. When (1) happens, the application should check that the proposed name does
  930. at least contain one '.' character. This prevents a common error in
  931. beginners, who just see the proposed leaf name, and attempt to press OK
  932. immediately. The error message "To save, drag the file icon to a directory
  933. viewer" should be used for this case.
  934.  
  935. When a drag happens, send a message to the window where the drag ends,
  936. saying that you want to save the file. The window (if it is a dir viewer)
  937. will reply with the name of the directory. Append your leaf-name to this and
  938. save there.
  939.  
  940. If the save is succesful, update your stored name for the document
  941. and remove the dbox: the operation is complete. Check return codes and
  942. errors from saves.
  943.  
  944. "Save" should be interpreted as being like "save and resume" from some
  945. other systems, e.g. after the operation the user is still editing the
  946. same document. Save should cause the document to be marked unmodified,
  947. unless the save was to a scrap file (see the section on data transfer).
  948.  
  949. Remember the datestamp on a loaded document. If the document is stored
  950. without being modified, save with an unchanged datestamp. Otherwise, save
  951. with the current datestamp and update the retained datestamp for
  952. the document.
  953.  
  954. Saving a portion of a document (e.g. "Save Selection") may be grouped either
  955. with other save operations, or with the Save File operation. If there are
  956. several possible selection save formats then putting it on Save may be more
  957. appropriate. Balancing submenus may also be an issue. Edit and Paint, for
  958. instance, group it with other selection operations while Draw (which has
  959. several differnt forms of Save Selection, and many other operations on the
  960. Selection submenu) groups it with Save File.
  961.  
  962. Closing document windows
  963. ------------------------
  964.  
  965. If the user clicks on the Close icon of a document window,
  966. and there is unsaved data, then you should pop up a dialogue box
  967. asking:
  968.   Do you want to save your edited file?  (if the document has no title)
  969. or:
  970.   Do you want to save edited file '%s'?
  971. You can copy this dialogue box from Edit's template file. If the answer
  972. is Yes then pop up a save dialogue box, and if the result is saved then
  973. close the window. If the answer is No, or any cancel-menu (e.g. ESC)
  974. occurs, then the operation is abandoned.
  975.  
  976. An additional feature that can be implemented on the close button is as
  977. follows: if the user clicks ADJUST on the close icon then close the
  978. document, and open the parent directory viewer (using *filer_opendir). This
  979. is similar to the use of ADJUST on the close icon of a directory viewer: the
  980. directory tree, and the documents within it, are thought of as a continuous
  981. tree of information over which the user navigates. If he clicks ADJUST with
  982. shift held down, or with the document modified, just open the parent.
  983.  
  984. Quitting editors
  985. ----------------
  986.  
  987. A Quit operation should be supplied at the bottom of the menu attatched
  988. to the icon of an editor. If it is selected when there is unsaved data,
  989. then ask the question:
  990.   %n file%s edited but not saved in <prog>: are you sure you want to Quit?
  991. (The %s should be "s" if the %n is not 1, else "".)
  992.  
  993. The same question should be asked if a desktop-closedown sequence occurs.
  994. In such a case, if the answer is Yes, then the desktop-closedown sequence
  995. should be restarted by sending a shift-control-f12 keystroke message to
  996. the original sender of the desktop-closedown message.
  997.  
  998. Data interchange
  999. ----------------
  1000.  
  1001. One of the most powerful aspects of multi-tasking in RISC OS is the direct
  1002. dragging of data from one application to another, and its easy import and
  1003. export in a variety of formats from applications.
  1004.  
  1005. Think of a data format as a commitment to forwards and (if possible) backwards
  1006. compatibility. Write an extremely careful definition of your data format, and
  1007. try to build in:
  1008.     testing for the correctness of the file
  1009.     version control for the file format
  1010.     extensibility for the file format
  1011. If your application is successful and widely used then other software
  1012. authors will be tempted to write other programs that perform other
  1013. operations on the data formats that you have defined. Work hard to encourage
  1014. this! Send a copy of such a format definition to Acorn ISV support, it will
  1015. then be available to other ISVs as an embryonic de facto standard for that
  1016. particular type of data.
  1017.  
  1018. Do not reinvent the wheel. If there is already a data format out there to
  1019. describe what you want then use that: even if it comes from a computing
  1020. system or background that you do not intend to work with.
  1021.  
  1022. Miscellaneous
  1023. -------------
  1024.  
  1025. Do not take idle events unless you have to. They slow everything down. If
  1026. you do need to take null events, Wimp_PollIdle is preferable to Wimp_Poll,
  1027. unless the user is directly involved (eg. dragging an object) and
  1028. responsiveness is important.
  1029.  
  1030. If you set your own pointer shapes, use pointer 2 for them. Set back to
  1031. pointer 1 (the standard generic arrow) on a pointer-leaving-window event.
  1032. Pointers 3 and 4 are used by the hourglass.
  1033.  
  1034. Do not use mouse colour 2, as it behaves strangely on hi-res mono
  1035. screens (e.g. it alternates between black and transparent!).
  1036.  
  1037. Do not pop your window to the front when grabbing the caret, and do
  1038. not grab the caret when your window is popped to the front. You should
  1039. only grab the caret as a response to clicks within your work area.
  1040.  
  1041. The Wimp's drag operations are specifically for drags that must occur
  1042. outside all windows. As well as the crawling-box form they allow the use of
  1043. user-defined graphics, allowing arbitrary objects to be dragged between
  1044. windows.
  1045.  
  1046. If you build drag operations within your window, check that redraw works
  1047. correctly when things move in background (the Madness application is useful
  1048. for this). Also, it is important to note that such "within-window" dragging
  1049. must use Wimp_UpdateWindow to update the window, rather than drawing
  1050. directly on the screen.
  1051.  
  1052. If the drag works with the mouse button up then menu selection and scrolling
  1053. can happen during the drag, which is often useful. Stop following the drag
  1054. on a pointer-leaving-window event, and start again on a
  1055. pointer-entering-window event.
  1056.  
  1057. If the drag works with button-down, then it may continue to work if the
  1058. pointer is moved out of the window with the button still down. Alternatively
  1059. for button-down drags, you can restrict the pointer to the visible work
  1060. area, and automatically scroll the window if the pointer gets close to the
  1061. edge.
  1062.  
  1063. Always check all error returns from Wimp calls. This includes
  1064. Wimp_Poll, which can fail in rare circumstances.
  1065.  
  1066. Beware errors in redraw code, they are a common way for systems to lock up
  1067. (because the redraw fails, the Wimp asks you again to redraw, and so on). A
  1068. suddenly missing font, for instance, should not lead to infinite looping.
  1069. Check that the failure of window or icon creation does not lead you to crash
  1070. or lose data. Check cases concerning running out of space.
  1071.  
  1072. Do not use Wimp_CopyBlock during redraw, even if you know that the source is
  1073. visible: Wimp_CopyBlock should be used outside the redraw loop, to copy
  1074. whatever relevant areas of the window are visible, and cause
  1075. redraw-window-events for the rest. Redraw routines should be very similar
  1076. (or identical) to routines used to print graphics, for which CopyBlock (and
  1077. XOR-ing tricks) will not work.
  1078.  
  1079. If the user is asked to insert a floppy disc and hits "Cancel", you get
  1080. an error "Disc not present" or "Disc not known" from ADFS (look up
  1081. the IDs in the PRM). If you get either of these errors from an operation you
  1082. need not call Wimp_ReportError, just cancel the operation. This avoids the
  1083. user getting two error boxes in a row.
  1084.  
  1085. There are two clocks showing real time in the system, the hardware clock and
  1086. a centisecond timer. The two can diverge by a few seconds a day, but are
  1087. resynchronised at machine reset. For consistency, always use the
  1088. centisecond timer.
  1089.  
  1090. Do not have phrases like "at line 1230" in error messages from Basic
  1091. programs. "(internal error code 1230)" is preferable.
  1092.  
  1093. DO NOT BYPASS OS DEVICE INTERFACES AND ACCESS HARDWARE DEVICES DIRECTLY! DO
  1094. NOT PEEK AND POKE PAGE ZERO LOCATIONS, OR KERNEL WORKSPACE! Such tricks may
  1095. well NOT WORK on future machine and operating system upgrades. Acorn will
  1096. pursue a policy of continuous improvement and expansion for its Archimedes
  1097. product-line: build your software to last.
  1098.  
  1099. The File dialogue box provides useful information about a file being
  1100. edited. Provide it at the top of the menu in a file window, or within a
  1101. Misc submenu there (if there are other miscellaneous menu entries to
  1102. collect).
  1103.  
  1104. Filenames of up to 255 characters should work. Longer filenames should
  1105. not crash your application.
  1106.  
  1107. When using Wimp_PollIdle, remember that monotonic times can go negative
  1108. (e.g. wrap round in a 32-bit representation) after around six weeks.
  1109. So when comparing two times,
  1110.     (newtime - oldtime) > 100
  1111. is a better comparison than
  1112.     newtime > oldtime + 100.
  1113. This problem caused early versions of MailMan to go wrong after six weeks of
  1114. continuous use.
  1115.  
  1116. Interactive help is extremely easy to provide via the !Help application:
  1117. doing so enormously increases user's confidence that all desktop
  1118. applications are working together. It may even be helpful too, particularly
  1119. to occasional users of the package who just need a little reminder of what
  1120. it does.
  1121.