home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / acorn / tech / 1009 < prev    next >
Encoding:
Internet Message Format  |  1992-12-14  |  2.6 KB

  1. Path: sparky!uunet!mcsun!sun4nl!tuegate.tue.nl!svin09!wsintt02!wsinda
  2. From: wsinda@wsintt02.info.win.tue.nl (Dick Alstein)
  3. Newsgroups: comp.sys.acorn.tech
  4. Subject: CFD: Icon names in templates
  5. Message-ID: <4814@svin09.info.win.tue.nl>
  6. Date: 14 Dec 92 13:43:02 GMT
  7. Sender: news@svin09.info.win.tue.nl
  8. Reply-To: wsinda@info.win.tue.nl
  9. Lines: 51
  10.  
  11.  
  12. This posting is a Call For Discussion. Its purpose is solely to
  13. start a discussion about possible solutions to a problem that
  14. many programmers will have come across, and, hopefully, get some
  15. cooperation from Acorn in solving it.
  16.  
  17. When you are developing an application that uses templates, your
  18. application must know the numbers of icons in order to support
  19. their function. But when you are adding icons to a template (e.g.
  20. to extend the functionality of the application), you may have to
  21. change the icon numbers.
  22.  
  23. Upon which you have to adapt the program. You may have to check
  24. every line in which an icon is referred to. Of course you can get
  25. around it partly, by setting a constant or variable (e.g. put a
  26. line like '#define OK_button 2' in a C header file). But you
  27. still have to take care that the icon numbers in the template
  28. definition match those in the program. It becomes a real pain if
  29. you tend to develop a program stepwise (add a feature, test it,
  30. add another feature, etc.).
  31.  
  32. A solution is to give the icons names, and add these to the
  33. template definition, just as the templates themselves have
  34. identifiers. Then you would only have to look up the icon number
  35. that is linked to the name, at the start of the program. And the
  36. icon references would remain correct throughout revisions of the
  37. templates (provided that the icons keep their - unique - name, of
  38. course).
  39.  
  40. To make this work, the following is needed:
  41.  
  42. * A standard for icon names, defining their maximum length and
  43. the way they are stored in a template file. This means that the
  44. file format of template file must be extended. The current
  45. format definition does have room for such an extension.
  46.  
  47. * A template editor that supports it. It must be able to read,
  48. edit and save the icon names. (I'm currently working on one, and
  49. it shouldn't be too difficult to add this feature.)
  50.  
  51. * Plus, ideally, a patch module providing an SWI to search for
  52. the icon number belonging to a name. So you can write something
  53. like: SYS "Wimp_IconNameToNumber",,"SaveBox","OK_button" TO ,,,nr%)
  54.  
  55. Reactions, please. Alternatives, additions, likes & dislikes,
  56. opinions, ... Something like this probably already exists in
  57. other windowing system (Mac, X windows, MS-windows), but I'm not
  58. familiar with any of those. Maybe someone in the know can
  59. describe one of'em. Anyone from Acorn care to react?
  60.  
  61. Dick Alstein
  62.