texmacs-dev
[Top][All Lists]
Advanced

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

Re: [Texmacs-dev] Widgets


From: Michael Klein
Subject: Re: [Texmacs-dev] Widgets
Date: Mon, 3 Sep 2007 20:26:37 +0200

Hello Joris,

thanks for your help. It works like a charm :)

Best regards
Michael

2007/9/3, Joris van der Hoeven <address@hidden >:
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


_______________________________________________
Texmacs-dev mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/texmacs-dev


reply via email to

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