[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Texmacs-dev] Widgets
From: |
Joris van der Hoeven |
Subject: |
Re: [Texmacs-dev] Widgets |
Date: |
Mon, 3 Sep 2007 17:05:58 +0200 |
User-agent: |
Mutt/1.5.9i |
On Mon, Sep 03, 2007 at 04:50:50PM +0200, Michael Klein wrote:
> Hello Joris,
>
> yes I can. I do it with a parameter like this
> (tm-build-widget (message-widget error-text)
> ,error-text
> ===
> (bar
> >>>
> (button "Done" (dismiss))))
>
> (define (display-message list-of-messages)
> (let* ((error-text ""))
> (for-each (lambda (i)
> (set! error-text (string-append error-text i "\n")))
> list-of-messages)
> (widget-popup "message" `(message-widget ,error-text))))
>
> This adds the text to the widget but it does not respect the linebreaks.
You are treating the TeXmacs document as an ASCII text, which is evil.
You should generate a structured document, such as
(document "message 1" "message 2" ... "message n")
or, even better:
(document
(enumerate
(document (concat (item) "message 1")
...
(concat (item) "message n"))))
Best wishes, Joris