home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / prolog / 1440 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  1.6 KB

  1. Path: sparky!uunet!mcsun!uknet!edcastle!edcogsci!asch
  2. From: asch@cogsci.ed.ac.uk (Andreas Schoter)
  3. Newsgroups: comp.lang.prolog
  4. Subject: Re: Prolog-WIMP interfacing principles
  5. Message-ID: <10217@scott.ed.ac.uk>
  6. Date: 22 Jul 92 08:49:34 GMT
  7. References: <3545@keele.keele.ac.uk>
  8. Organization: Centre for Cognitive Science, Edinburgh, UK
  9. Lines: 25
  10.  
  11. In article <3545@keele.keele.ac.uk> csa09@seq1.keele.ac.uk (Paul Singleton) writes:
  12. >Please can anyone with experience or insight suggest some principles
  13. >for interfacing Prolog programs to WIMP interfaces, i.e. buttons, sliders,
  14. >menus, dialog boxes and all that stuff.  I avoid asserting and retracting
  15. >global state, and try to contain side-effects, and I can't see how to
  16. >employ WIMP features without compromising this style.  Well, I can, but ...
  17.  
  18. You don't specify what level of abstraction the WIMP features are
  19. specified at, low level wiget type facilities, or high level packaged
  20. utilityies, but...
  21.  
  22. Last summer I did some work at Sussex with the Poplog Prolog system
  23. interfacing it to the Athena X system.  There was already an interface
  24. for the Pop11 language so what I did was to hook the Prolog into the
  25. Pop11.  The net result was a set of new "builtin" predictes in Prolog
  26. which behaved like write/1 etc.  (Admitedly much of this took advantage
  27. of the Pop11 datastructures to store wiget info thus avoiding explicit
  28. asserts and retracts at the Prolog end).
  29.  
  30. Yes, these are, strictly, side effect predicates, but I don't see
  31. anyway around that.  If your Prolog has a good C interface the same
  32. technique should work, hook Prolog predictes into foreign language
  33. functions that perform the necessary graphics.  
  34.  
  35. Andreas
  36.