home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!uknet!keele!csa09
- From: csa09@seq1.keele.ac.uk (Paul Singleton)
- Newsgroups: comp.lang.prolog
- Subject: Re: Prolog-WIMP interfacing principles: clarification
- Message-ID: <3586@keele.keele.ac.uk>
- Date: 23 Jul 92 10:46:58 GMT
- References: <10217@scott.ed.ac.uk>
- Organization: University of Keele, England
- Lines: 41
-
- From article <10217@scott.ed.ac.uk>, by asch@cogsci.ed.ac.uk (Andreas Schoter):
-
- > In article <3545@keele.keele.ac.uk> csa09@seq1.keele.ac.uk (Paul Singleton):
-
- >>Please can anyone with experience or insight suggest some principles
- >>for interfacing Prolog programs to WIMP interfaces, i.e. buttons, sliders,
- >>menus, dialog boxes and all that stuff. I avoid asserting and retracting
- >>global state, and try to contain side-effects, and I can't see how to
- >>employ WIMP features without compromising this style. Well, I can, but ...
-
- > You don't specify what level of abstraction the WIMP features are
- > specified at, low level wiget type facilities, or high level packaged
- > utilityies, but...
-
- I am using Quintus Prolog's ProXT - "a Prolog interface to the Motif widget
- set and the X Toolkit (Xt)". I have no X experience, nor do I really
- want it :-) and I am presently puzzling over how to combine it with my
- Prolog programming style, which I claim is fairly clean and amenable to
- debugging, maintenance, evolution etc. I carry all program state around
- as data structures passed from call to call. All iteration is done with
- recursion, not with e.g. failure-driven backtracking and assert/retract.
- I am reluctant to sprinkle imperative X calls throughout my code, and not
- sure how to handle events.
-
- When I wrote my first SunTools application, in C, I learnt to turn my
- program inside out and effectively write a bunch of interrupt routines
- which were called by the "Notifier". Should I do the same with Prolog?
- How can I, without global state?
-
- I have considered funnelling all events into a pretend "stream", and
- organising my program to recursively digest this stream. Can anyone
- advise me, from experience or dogma, on this or other approaches?
-
- Can WIMP interfaces be treated declaratively?
-
- Paul S.
- ----
- __ __ Paul Singleton (Mr) JANET: paul@uk.ac.keele.cs
- |__) (__ Computer Science Dept. other: paul@cs.keele.ac.uk
- | . __). Keele University, Newcastle, tel: +44 (0)782 621111 x7355
- Staffs ST5 5BG, ENGLAND fax: +44 (0)782 713082
-