Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"There is hopeful symbolism in the fact that flags do not wave in a vacuum." -- Arthur C. Clarke


devel / comp.lang.tcl / Strange behaviour of shtmlview

SubjectAuthor
* Strange behaviour of shtmlviewHelmut Giese
`* Re: Strange behaviour of shtmlviewgreg
 `* Re: Strange behaviour of shtmlviewD Groth
  `* Re: Strange behaviour of shtmlviewHelmut Giese
   `* Re: Strange behaviour of shtmlviewD Groth
    `- Re: Strange behaviour of shtmlviewD Groth

1
Strange behaviour of shtmlview

<83mbchhkb1sd7pj36jqfq7fpi91digh1qu@4ax.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=19641&group=comp.lang.tcl#19641

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: hgiese@ratiosoft.com (Helmut Giese)
Newsgroups: comp.lang.tcl
Subject: Strange behaviour of shtmlview
Date: Wed, 06 Jul 2022 21:14:01 +0200
Organization: ratiosoft
Lines: 50
Message-ID: <83mbchhkb1sd7pj36jqfq7fpi91digh1qu@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: reader01.eternal-september.org; posting-host="6d16b127a5dbdba86c315809713ca0c9";
logging-data="133792"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19tbJTD2Khbokn8a8CWAW3Z"
Cancel-Lock: sha1:XyaQVGKCJlvKJBgB8215IRMoDic=
X-Newsreader: Forte Free Agent 1.93/32.576 English (American)
 by: Helmut Giese - Wed, 6 Jul 2022 19:14 UTC

Hello out there,
I want to use shtmlview for showing little help texts during a series
of configuration screens. To get familiar with markdown I devised the
script below to get immediate feedback as I ventured along learning
markdown.
To my surprise the shtmlview window remains empty whereas the
generated HTML file looks ok and displays fine in my Firefox. The
greatest surprise, however, happened when I had the empty text widget
display its content: It showed all the text with the markdown
'markers' removed (The '===' and the '###') and a nicely formatted
list, too.
How can this be? And what can I do about it?
Any help or idea will be greatly appreciated.
A slightly puzzled
Helmut

This is my Tcl file (mkdoc.tcl):
----
package require mkdoc

if {! [info exists hlp]} {
package require shtmlview::shtmlview
set hlp [shtmlview::shtmlview .hlp -toolbar 0]
}

proc mkdoc {in hlp} {
set out [file rootname $in].html
mkdoc::mkdoc $in $out
$hlp browse $out
} mkdoc [lindex $argv 0] $hlp
puts "Content: '[$hlp helptext get 1.0 end]'"
----
and this a sample file passed to it (sample.md):
----
A sample for 'markdown'
=======================

This sample tries to understand markdown.

### Lists

Markdown supports ordered (numbered) and unordered (bulleted) lists.
Unordered lists use asterisks, pluses, and hyphens -- interchangably
-- as list markers:

* Red
* Green
* Blue
----

Re: Strange behaviour of shtmlview

<ce9345f3-527b-41b7-87ff-a04a8cd24669n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=19645&group=comp.lang.tcl#19645

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:620a:2447:b0:6b2:3e10:ca56 with SMTP id h7-20020a05620a244700b006b23e10ca56mr27517155qkn.485.1657207069751;
Thu, 07 Jul 2022 08:17:49 -0700 (PDT)
X-Received: by 2002:a05:6808:1893:b0:335:8f05:ce27 with SMTP id
bi19-20020a056808189300b003358f05ce27mr2789264oib.238.1657207069463; Thu, 07
Jul 2022 08:17:49 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Thu, 7 Jul 2022 08:17:49 -0700 (PDT)
In-Reply-To: <83mbchhkb1sd7pj36jqfq7fpi91digh1qu@4ax.com>
Injection-Info: google-groups.googlegroups.com; posting-host=185.250.212.53; posting-account=99ziWAoAAADLScDbI_CyfIcpa_gFZ0zh
NNTP-Posting-Host: 185.250.212.53
References: <83mbchhkb1sd7pj36jqfq7fpi91digh1qu@4ax.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ce9345f3-527b-41b7-87ff-a04a8cd24669n@googlegroups.com>
Subject: Re: Strange behaviour of shtmlview
From: gregor.ebbing@googlemail.com (greg)
Injection-Date: Thu, 07 Jul 2022 15:17:49 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1358
 by: greg - Thu, 7 Jul 2022 15:17 UTC

Helmut Giese schrieb am Mittwoch, 6. Juli 2022 um 21:14:05 UTC+2:

> This is my Tcl file (mkdoc.tcl):

> package require mkdoc
>
>
> proc mkdoc {in hlp} {

name of the tcl file (mkdoc.tcl) other than the proc. and package

Gregor

Re: Strange behaviour of shtmlview

<d35abde5-334b-456d-b3b9-6e2a688ab69en@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=19646&group=comp.lang.tcl#19646

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:ad4:5c6f:0:b0:473:17a7:8d23 with SMTP id i15-20020ad45c6f000000b0047317a78d23mr8431019qvh.38.1657208287267;
Thu, 07 Jul 2022 08:38:07 -0700 (PDT)
X-Received: by 2002:a05:6830:3902:b0:619:1012:d678 with SMTP id
br2-20020a056830390200b006191012d678mr8918822otb.7.1657208286979; Thu, 07 Jul
2022 08:38:06 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Thu, 7 Jul 2022 08:38:06 -0700 (PDT)
In-Reply-To: <ce9345f3-527b-41b7-87ff-a04a8cd24669n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:638:807:505:237f:7428:6f69:e83b;
posting-account=l1SsogoAAADI9wGGep0j80-iEOPtae47
NNTP-Posting-Host: 2001:638:807:505:237f:7428:6f69:e83b
References: <83mbchhkb1sd7pj36jqfq7fpi91digh1qu@4ax.com> <ce9345f3-527b-41b7-87ff-a04a8cd24669n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d35abde5-334b-456d-b3b9-6e2a688ab69en@googlegroups.com>
Subject: Re: Strange behaviour of shtmlview
From: tbgroth15@gmail.com (D Groth)
Injection-Date: Thu, 07 Jul 2022 15:38:07 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1747
 by: D Groth - Thu, 7 Jul 2022 15:38 UTC

greg schrieb am Donnerstag, 7. Juli 2022 um 17:17:51 UTC+2:
> Helmut Giese schrieb am Mittwoch, 6. Juli 2022 um 21:14:05 UTC+2:
>
> > This is my Tcl file (mkdoc.tcl):
> > package require mkdoc
> >
> >
> > proc mkdoc {in hlp} {
>
>
> name of the tcl file (mkdoc.tcl) other than the proc. and package
>
> Gregor

You did not pack the widget as far as I can see.

BTW: Which version of shtmlview you are using? That from the github-repo https://github.com/mittelmark/shtmlview or that from tklib-repo?

Detlef

Re: Strange behaviour of shtmlview

<kedech5iir794auh6p672l4hcj554dgpds@4ax.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=19647&group=comp.lang.tcl#19647

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: hgiese@ratiosoft.com (Helmut Giese)
Newsgroups: comp.lang.tcl
Subject: Re: Strange behaviour of shtmlview
Date: Thu, 07 Jul 2022 21:52:01 +0200
Organization: ratiosoft
Lines: 20
Message-ID: <kedech5iir794auh6p672l4hcj554dgpds@4ax.com>
References: <83mbchhkb1sd7pj36jqfq7fpi91digh1qu@4ax.com> <ce9345f3-527b-41b7-87ff-a04a8cd24669n@googlegroups.com> <d35abde5-334b-456d-b3b9-6e2a688ab69en@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: reader01.eternal-september.org; posting-host="71c1acd5a1d4f67cc484f705fdb46e2c";
logging-data="505214"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19WXj747GYrgAhvOTnekJJe"
Cancel-Lock: sha1:8jRjaO3WdI9wmKOLLmP1HZ5q884=
X-Newsreader: Forte Free Agent 1.93/32.576 English (American)
 by: Helmut Giese - Thu, 7 Jul 2022 19:52 UTC

D Groth <tbgroth15@gmail.com> schrieb:

> You did not pack the widget as far as I can see.
>
>BTW: Which version of shtmlview you are using? That from the github-repo https://github.com/mittelmark/shtmlview or that from tklib-repo?
>
>Detlef
Hi Detlef,
this was it in fact. Once I packed it it showed up in all its glory.
What a stupid mistake.
Many thanks for spotting it - and for this package, too.
From where did I get it? I don't know. I remembered a thread here in
clt several months ago, found it and then somehow got it. It has a
file size of 146.329 and says
package provide shtmlview::shtmlview 1.1.0

Thanks again and best regards
Helmut
PS: Checking the github address you gave above I found that I have
exact this version:

Re: Strange behaviour of shtmlview

<0a55d348-7614-4750-92bf-1764c57ddd5bn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=19648&group=comp.lang.tcl#19648

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:6214:3003:b0:462:1c15:772c with SMTP id ke3-20020a056214300300b004621c15772cmr1221376qvb.71.1657255047435;
Thu, 07 Jul 2022 21:37:27 -0700 (PDT)
X-Received: by 2002:aca:6155:0:b0:339:c8d4:d601 with SMTP id
v82-20020aca6155000000b00339c8d4d601mr757822oib.113.1657255047139; Thu, 07
Jul 2022 21:37:27 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Thu, 7 Jul 2022 21:37:26 -0700 (PDT)
In-Reply-To: <kedech5iir794auh6p672l4hcj554dgpds@4ax.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:9e8:f7:d800:490c:7790:43a1:4af3;
posting-account=l1SsogoAAADI9wGGep0j80-iEOPtae47
NNTP-Posting-Host: 2001:9e8:f7:d800:490c:7790:43a1:4af3
References: <83mbchhkb1sd7pj36jqfq7fpi91digh1qu@4ax.com> <ce9345f3-527b-41b7-87ff-a04a8cd24669n@googlegroups.com>
<d35abde5-334b-456d-b3b9-6e2a688ab69en@googlegroups.com> <kedech5iir794auh6p672l4hcj554dgpds@4ax.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0a55d348-7614-4750-92bf-1764c57ddd5bn@googlegroups.com>
Subject: Re: Strange behaviour of shtmlview
From: tbgroth15@gmail.com (D Groth)
Injection-Date: Fri, 08 Jul 2022 04:37:27 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2553
 by: D Groth - Fri, 8 Jul 2022 04:37 UTC

Sometimes we loose so much time on the easy, stupid errors ...
BTW: In the later versions you can toggle between view and edit mode using Ctrl-Shift-e (Ctrl-E) for editing and Ctrl-s for saving, Ctrl-r for reloading, see the manual page. The editor is just a simple text widget but sufficient for small changes.
The widget will be part of the next Tklib release.
Detlef

Helmut Giese schrieb am Donnerstag, 7. Juli 2022 um 21:52:05 UTC+2:
> D Groth <tbgr...@gmail.com> schrieb:
> > You did not pack the widget as far as I can see.
> >
> >BTW: Which version of shtmlview you are using? That from the github-repo https://github.com/mittelmark/shtmlview or that from tklib-repo?
> >
> >Detlef
> Hi Detlef,
> this was it in fact. Once I packed it it showed up in all its glory.
> What a stupid mistake.
> Many thanks for spotting it - and for this package, too.
> From where did I get it? I don't know. I remembered a thread here in
> clt several months ago, found it and then somehow got it. It has a
> file size of 146.329 and says
> package provide shtmlview::shtmlview 1.1.0
>
> Thanks again and best regards
> Helmut
> PS: Checking the github address you gave above I found that I have
> exact this version:

Re: Strange behaviour of shtmlview

<f9d64b60-c8df-4cf3-b726-8f996d5a507cn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=19649&group=comp.lang.tcl#19649

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a37:c401:0:b0:6b4:8cb4:b81e with SMTP id d1-20020a37c401000000b006b48cb4b81emr972658qki.768.1657255807861;
Thu, 07 Jul 2022 21:50:07 -0700 (PDT)
X-Received: by 2002:a05:6870:64a8:b0:10c:fe1:6528 with SMTP id
cz40-20020a05687064a800b0010c0fe16528mr893900oab.6.1657255807557; Thu, 07 Jul
2022 21:50:07 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Thu, 7 Jul 2022 21:50:07 -0700 (PDT)
In-Reply-To: <0a55d348-7614-4750-92bf-1764c57ddd5bn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:9e8:f7:d800:490c:7790:43a1:4af3;
posting-account=l1SsogoAAADI9wGGep0j80-iEOPtae47
NNTP-Posting-Host: 2001:9e8:f7:d800:490c:7790:43a1:4af3
References: <83mbchhkb1sd7pj36jqfq7fpi91digh1qu@4ax.com> <ce9345f3-527b-41b7-87ff-a04a8cd24669n@googlegroups.com>
<d35abde5-334b-456d-b3b9-6e2a688ab69en@googlegroups.com> <kedech5iir794auh6p672l4hcj554dgpds@4ax.com>
<0a55d348-7614-4750-92bf-1764c57ddd5bn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f9d64b60-c8df-4cf3-b726-8f996d5a507cn@googlegroups.com>
Subject: Re: Strange behaviour of shtmlview
From: tbgroth15@gmail.com (D Groth)
Injection-Date: Fri, 08 Jul 2022 04:50:07 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 27
 by: D Groth - Fri, 8 Jul 2022 04:50 UTC

PS: You can as well render and edit directly Markdown files, just running the shtmlview.tcl file directly from the terminal:
`tclsh shtmlview.tcl sample.md` In Tklib the application is separated from the widget, `shtmlview sample.md` should do the trick then.

D Groth schrieb am Freitag, 8. Juli 2022 um 06:37:29 UTC+2:
> Sometimes we loose so much time on the easy, stupid errors ...
> BTW: In the later versions you can toggle between view and edit mode using Ctrl-Shift-e (Ctrl-E) for editing and Ctrl-s for saving, Ctrl-r for reloading, see the manual page. The editor is just a simple text widget but sufficient for small changes.
> The widget will be part of the next Tklib release.
> Detlef
> Helmut Giese schrieb am Donnerstag, 7. Juli 2022 um 21:52:05 UTC+2:
> > D Groth <tbgr...@gmail.com> schrieb:
> > > You did not pack the widget as far as I can see.
> > >
> > >BTW: Which version of shtmlview you are using? That from the github-repo https://github.com/mittelmark/shtmlview or that from tklib-repo?
> > >
> > >Detlef
> > Hi Detlef,
> > this was it in fact. Once I packed it it showed up in all its glory.
> > What a stupid mistake.
> > Many thanks for spotting it - and for this package, too.
> > From where did I get it? I don't know. I remembered a thread here in
> > clt several months ago, found it and then somehow got it. It has a
> > file size of 146.329 and says
> > package provide shtmlview::shtmlview 1.1.0
> >
> > Thanks again and best regards
> > Helmut
> > PS: Checking the github address you gave above I found that I have
> > exact this version:

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor