texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Texmacs-dev] Dialogues (for real scheme hackers)


From: Joris van der Hoeven
Subject: [Texmacs-dev] Dialogues (for real scheme hackers)
Date: Sat, 21 May 2005 13:46:13 +0200
User-agent: Mutt/1.5.6+20040907i

Hi all,

On the CVS version of TeXmacs, you find a new facility for
asynchronous interactive dialogues with the user,
based on continuations. For instance, you may try to
execute the following test function:

-------------------------------------------------
(define (dialogue-test)
  (dialogue
    (display* "Blah blah blah\n")
    (display* "First square: "
              (square (string->number (dialogue-ask "First number")))
              "\n")
    (interactive hi)
    (while (== (dialogue-ask "Continue?") "yes") (noop))
    (delayed (:pause 2000))
    (display* "Second square: "
              (square (string->number (dialogue-ask "Second number")))
              "\n")
    (display* "Blah blah blah\n")))
-------------------------------------------------

Due to lack of time, the facility is not yet 100% satisfactory,
so there might be a volunteer for helping on the following issues:
  1) Nested dialogues.
  2) Better error reporting using lazy-catch.
If these points are solved (mainly 2), then I could encapsulate
any menu, keyboard and other interactive actions into dialogues.

Best wishes, Joris




reply via email to

[Prev in Thread] Current Thread [Next in Thread]