Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

One Bell System - it sometimes works.


devel / comp.lang.tcl / Re: .text dump - is there an inverse and size to fit

SubjectAuthor
* .text dump - is there an inverse and size to fitet99
+* .text dump - is there an inverse and size to fitgreg
|`- .text dump - is there an inverse and size to fitet99
`* .text dump - is there an inverse and size to fitgreg
 `- .text dump - is there an inverse and size to fitet99

1
.text dump - is there an inverse and size to fit

<um2ujp$1e34r$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: et9...@rocketship1.me (et99)
Newsgroups: comp.lang.tcl
Subject: .text dump - is there an inverse and size to fit
Date: Thu, 21 Dec 2023 19:08:39 -0800
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <um2ujp$1e34r$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 22 Dec 2023 03:08:41 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c7acb795a299b4aab8384e8d15ab48ac";
logging-data="1510555"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/V+UYIrIbCH7jM5i+LTIjK"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.6.1
Cancel-Lock: sha1:vtznNrQ63wGcG58AWK+4cEmTonI=
Content-Language: en-US
 by: et99 - Fri, 22 Dec 2023 03:08 UTC

I found Arjen's little word processor on the wiki.

https://wiki.tcl-lang.org/page/Editing+with+different+fonts

The store command uses the "dump" command for a text widget outputting triples.

..text dump 1.0 end

Question 1:

I want to take that list, save, and then restore to an empty text widget. Is there an inverse?

Or do I have to go down the triples and generate a command that does what they indicate. It's not coming to me just what those commands might be for each of text, mark, tagon, tagoff. Does anyone have a snippet that does that?

Question 2:

Once I have this text restored, is there an easy way to make the text widget resize to just fit the text. Note that the text won't necessarily be a single fixed size font. And I want it to be a border-less window. Sorta like a tooltip.

I've done some internet searches on this and the answers are all in python, which I don't speak.

Thanks

et

Re: .text dump - is there an inverse and size to fit

<4f0c089a-3a01-427f-a1e5-df4c0e88e697n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:ac8:41d8:0:b0:427:a7c0:b19d with SMTP id o24-20020ac841d8000000b00427a7c0b19dmr99363qtm.6.1703224979746;
Thu, 21 Dec 2023 22:02:59 -0800 (PST)
X-Received: by 2002:ac8:5d87:0:b0:417:b53c:5d4c with SMTP id
d7-20020ac85d87000000b00417b53c5d4cmr32954qtx.1.1703224979365; Thu, 21 Dec
2023 22:02:59 -0800 (PST)
Path: i2pn2.org!i2pn.org!nntp.comgw.net!usenet.blueworldhosting.com!diablo1.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, 21 Dec 2023 22:02:59 -0800 (PST)
In-Reply-To: <um2ujp$1e34r$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=185.250.212.12; posting-account=99ziWAoAAADLScDbI_CyfIcpa_gFZ0zh
NNTP-Posting-Host: 185.250.212.12
References: <um2ujp$1e34r$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4f0c089a-3a01-427f-a1e5-df4c0e88e697n@googlegroups.com>
Subject: Re: .text dump - is there an inverse and size to fit
From: gregor.e...@googlemail.com (greg)
Injection-Date: Fri, 22 Dec 2023 06:02:59 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1651
 by: greg - Fri, 22 Dec 2023 06:02 UTC

et99 schrieb am Freitag, 22. Dezember 2023 um 04:08:46 UTC+1:
>
>
> Question 1:
>
>
> I want to take that list, save, and then restore to an empty text widget. Is there an inverse?
>
> Or do I have to go down the triples and generate a command that does what they indicate. It's not coming to me just what those commands might be for each of text, mark, tagon, tagoff. Does anyone have a snippet that does that?
>
>

>
> Thanks
>
> et

https://wiki.tcl-lang.org/page/Serializing+a+text+widget

https://wiki.tcl-lang.org/page/ttd

greg

Re: .text dump - is there an inverse and size to fit

<e339373f-51f7-4cd3-a00d-21b74a2d5bdfn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:620a:c:b0:781:1fc0:e308 with SMTP id j12-20020a05620a000c00b007811fc0e308mr14760qki.7.1703229673335;
Thu, 21 Dec 2023 23:21:13 -0800 (PST)
X-Received: by 2002:a05:622a:2cb:b0:425:a996:63a7 with SMTP id
a11-20020a05622a02cb00b00425a99663a7mr136393qtx.11.1703229673059; Thu, 21 Dec
2023 23:21:13 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!border-2.nntp.ord.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, 21 Dec 2023 23:21:12 -0800 (PST)
In-Reply-To: <um2ujp$1e34r$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=185.250.212.12; posting-account=99ziWAoAAADLScDbI_CyfIcpa_gFZ0zh
NNTP-Posting-Host: 185.250.212.12
References: <um2ujp$1e34r$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e339373f-51f7-4cd3-a00d-21b74a2d5bdfn@googlegroups.com>
Subject: Re: .text dump - is there an inverse and size to fit
From: gregor.e...@googlemail.com (greg)
Injection-Date: Fri, 22 Dec 2023 07:21:13 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 28
 by: greg - Fri, 22 Dec 2023 07:21 UTC

et99 schrieb am Freitag, 22. Dezember 2023 um 04:08:46 UTC+1:

> Question 2:
> ...
> And I want it to be a border-less window. Sorta like a tooltip.
> ...

#!/usr/bin/env tclsh

#partial code from
#https://wiki.tcl-lang.org/page/wm+overrideredirect
#https://www.tcl.tk/man/tcl/TkCmd/wm.html#M56

package require Tk
catch { destroy .note errorswindow }
set w [ toplevel .note ]
wm withdraw .
tk appname "note"
wm title $w "note"
wm overrideredirect $::w 1
wm geometry $w "+190+190"

set content "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et"

text $w.note -wrap word -height 10 -width 20
button $w.btn -text Exit -command exit
pack $w.note $w.btn
$w.note insert end $content

Re: .text dump - is there an inverse and size to fit

<um3i5j$1gfl5$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: et9...@rocketship1.me (et99)
Newsgroups: comp.lang.tcl
Subject: Re: .text dump - is there an inverse and size to fit
Date: Fri, 22 Dec 2023 00:42:26 -0800
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <um3i5j$1gfl5$1@dont-email.me>
References: <um2ujp$1e34r$1@dont-email.me>
<4f0c089a-3a01-427f-a1e5-df4c0e88e697n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 22 Dec 2023 08:42:28 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c7acb795a299b4aab8384e8d15ab48ac";
logging-data="1588901"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18bZyccKV4mOjBftzxGCLqy"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.6.1
Cancel-Lock: sha1:2ypHfbLu70itfUiM1rwZRD6X5Ug=
Content-Language: en-US
In-Reply-To: <4f0c089a-3a01-427f-a1e5-df4c0e88e697n@googlegroups.com>
 by: et99 - Fri, 22 Dec 2023 08:42 UTC

On 12/21/2023 10:02 PM, greg wrote:
> https://wiki.tcl-lang.org/page/Serializing+a+text+widget
>
> https://wiki.tcl-lang.org/page/ttd

Outstanding! Thanks so much for the links.

et

Re: .text dump - is there an inverse and size to fit

<um3jci$1gkve$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: et9...@rocketship1.me (et99)
Newsgroups: comp.lang.tcl
Subject: Re: .text dump - is there an inverse and size to fit
Date: Fri, 22 Dec 2023 01:03:12 -0800
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <um3jci$1gkve$1@dont-email.me>
References: <um2ujp$1e34r$1@dont-email.me>
<e339373f-51f7-4cd3-a00d-21b74a2d5bdfn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 22 Dec 2023 09:03:14 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c7acb795a299b4aab8384e8d15ab48ac";
logging-data="1594350"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/kIXYc0h62i90syYE9LVN0"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.6.1
Cancel-Lock: sha1:Q4wLE04le9wlccZwdKVrAI/hRJM=
In-Reply-To: <e339373f-51f7-4cd3-a00d-21b74a2d5bdfn@googlegroups.com>
Content-Language: en-US
 by: et99 - Fri, 22 Dec 2023 09:03 UTC

On 12/21/2023 11:21 PM, greg wrote:
> package require Tk
> catch { destroy .note errorswindow }
> set w [ toplevel .note ]
> wm withdraw .
> tk appname "note"
> wm title $w "note"
> wm overrideredirect $::w 1
> wm geometry $w "+190+190"
>
> set content "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et"
>
> text $w.note -wrap word -height 10 -width 20
> button $w.btn -text Exit -command exit
> pack $w.note $w.btn
> $w.note insert end $content

Again, many thanks, now to combine the two pieces :)

et

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor