Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Marvelous! The super-user's going to boot me! What a finely tuned response to the situation!


devel / comp.lang.tcl / Overwrite mode?

SubjectAuthor
* Overwrite mode?Helmut Giese
+- Overwrite mode?greg
`* Overwrite mode?et99
 +- Overwrite mode?et99
 `* Overwrite mode?Helmut Giese
  `* Overwrite mode?Harald Oehlmann
   +- Overwrite mode?Harald Oehlmann
   `- Overwrite mode?Helmut Giese

1
Overwrite mode?

<9vsvii5llvhfcc1huq6crci9ns3cqgha69@4ax.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=12610&group=comp.lang.tcl#12610

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: hgiese@ratiosoft.com (Helmut Giese)
Newsgroups: comp.lang.tcl
Subject: Overwrite mode?
Date: Wed, 18 Oct 2023 17:07:31 +0200
Organization: ratiosoft
Lines: 5
Message-ID: <9vsvii5llvhfcc1huq6crci9ns3cqgha69@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="aefa8d4e04950f147b1702076388e18a";
logging-data="3909514"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/fUH6vjneOTjNaqf/EM/pg"
Cancel-Lock: sha1:BPMLAHdC0SLvNUuG7BC+WsuwWkg=
X-Newsreader: Forte Free Agent 1.93/32.576 English (American)
 by: Helmut Giese - Wed, 18 Oct 2023 15:07 UTC

Hello out there,
is it possible to set an entry to 'overwrite' mode instead of 'insert'
mode? I haven't found anything in the docs.
Any help will be greatly appreciated
Helmut

Re: Overwrite mode?

<5e57d339-b4f9-4883-9959-e959715a8604n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=12611&group=comp.lang.tcl#12611

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:620a:4147:b0:773:a789:cd07 with SMTP id k7-20020a05620a414700b00773a789cd07mr121859qko.4.1697647377756;
Wed, 18 Oct 2023 09:42:57 -0700 (PDT)
X-Received: by 2002:a9d:61cb:0:b0:6bd:c20:4215 with SMTP id
h11-20020a9d61cb000000b006bd0c204215mr1550155otk.7.1697647377485; Wed, 18 Oct
2023 09:42:57 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.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: Wed, 18 Oct 2023 09:42:56 -0700 (PDT)
In-Reply-To: <9vsvii5llvhfcc1huq6crci9ns3cqgha69@4ax.com>
Injection-Info: google-groups.googlegroups.com; posting-host=185.250.212.54; posting-account=99ziWAoAAADLScDbI_CyfIcpa_gFZ0zh
NNTP-Posting-Host: 185.250.212.54
References: <9vsvii5llvhfcc1huq6crci9ns3cqgha69@4ax.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5e57d339-b4f9-4883-9959-e959715a8604n@googlegroups.com>
Subject: Re: Overwrite mode?
From: gregor.ebbing@googlemail.com (greg)
Injection-Date: Wed, 18 Oct 2023 16:42:57 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1435
 by: greg - Wed, 18 Oct 2023 16:42 UTC

Helmut Giese schrieb am Mittwoch, 18. Oktober 2023 um 17:07:37 UTC+2:
> Hello out there,
> is it possible to set an entry to 'overwrite' mode instead of 'insert'
> mode? I haven't found anything in the docs.
> Any help will be greatly appreciated
> Helmut

Hi,
from wiki:

https://wiki.tcl-lang.org/page/Overwriting+an+entry+char+by+char

Re: Overwrite mode?

<ugqa7i$51ei$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=12613&group=comp.lang.tcl#12613

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: et99@rocketship1.me (et99)
Newsgroups: comp.lang.tcl
Subject: Re: Overwrite mode?
Date: Wed, 18 Oct 2023 21:10:26 -0700
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <ugqa7i$51ei$1@dont-email.me>
References: <9vsvii5llvhfcc1huq6crci9ns3cqgha69@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 19 Oct 2023 04:10:26 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a417ecf12b9f2fcc38139b660ecd4e25";
logging-data="165330"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+PCFvFsQfVEHVuqIA6Ufar"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.6.1
Cancel-Lock: sha1:bxiAJQP+vrULo4kJL1ayAzgsVE8=
Content-Language: en-US
In-Reply-To: <9vsvii5llvhfcc1huq6crci9ns3cqgha69@4ax.com>
 by: et99 - Thu, 19 Oct 2023 04:10 UTC

On 10/18/2023 8:07 AM, Helmut Giese wrote:
> Hello out there,
> is it possible to set an entry to 'overwrite' mode instead of 'insert'
> mode? I haven't found anything in the docs.
> Any help will be greatly appreciated
> Helmut
In the FWIW dept. if you like quick hacks, and/or you want to modify all entry widgets, the following is the code (with a mod) that handles inserting characters and is bound to <Key> in the Entry class:

proc ::tk::EntryInsert {w s} {
puts "insert into $w /$s/"
if {$s eq ""} {
return
}
catch {
set insert [$w index insert]
if {([$w index sel.first] <= $insert)
&& ([$w index sel.last] >= $insert)} {
$w delete sel.first sel.last
}
}
$w insert insert $s
$w delete insert ;# makes this write over mode
EntrySeeInsert $w
}

By adding the above

$w delete insert

you can make all entry widgets be overwrite mode. Maybe there should be a config parameter in entry and then make that conditional per widget by perhaps,

if [$w cget -writeover] {
$w delete insert
}

Re: Overwrite mode?

<ugqalo$51ei$2@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=12614&group=comp.lang.tcl#12614

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: et99@rocketship1.me (et99)
Newsgroups: comp.lang.tcl
Subject: Re: Overwrite mode?
Date: Wed, 18 Oct 2023 21:18:00 -0700
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <ugqalo$51ei$2@dont-email.me>
References: <9vsvii5llvhfcc1huq6crci9ns3cqgha69@4ax.com>
<ugqa7i$51ei$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 19 Oct 2023 04:18:01 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a417ecf12b9f2fcc38139b660ecd4e25";
logging-data="165330"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/P98b/5pkh3IuET0v8Mne2"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.6.1
Cancel-Lock: sha1:qyXda4eqlLAYEZ63tYKqbKBA5RE=
Content-Language: en-US
In-Reply-To: <ugqa7i$51ei$1@dont-email.me>
 by: et99 - Thu, 19 Oct 2023 04:18 UTC

On 10/18/2023 9:10 PM, et99 wrote:
> On 10/18/2023 8:07 AM, Helmut Giese wrote:
>> Hello out there,
>> is it possible to set an entry to 'overwrite' mode instead of 'insert'
>> mode? I haven't found anything in the docs.
>> Any help will be greatly appreciated
>> Helmut
> In the FWIW dept. if you like quick hacks, and/or you want to modify all entry widgets, the following is the code (with a mod) that handles inserting characters  and is bound to <Key> in the Entry class:
>
> proc ::tk::EntryInsert {w s} {
>     puts "insert into $w /$s/"
>     if {$s eq ""} {
>         return
>     }
>     catch {
>         set insert [$w index insert]
>         if {([$w index sel.first] <= $insert)
>             && ([$w index sel.last] >= $insert)} {
>             $w delete sel.first sel.last
>         }
>     }
>     $w insert insert $s
>     $w delete insert ;# makes this write over mode
>     EntrySeeInsert $w
> }
>
> By adding the above
>
> $w delete insert
>
> you can make all entry widgets be overwrite mode. Maybe there should be a config parameter in entry and then make that conditional per widget by perhaps,
>
> if [$w cget -writeover] {
>     $w delete insert
> }
>
>
That puts was my debugging test, ignore.

Re: Overwrite mode?

<6os2jilupua0ff0m76v4g9rbekh3cj5gfj@4ax.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=12621&group=comp.lang.tcl#12621

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: hgiese@ratiosoft.com (Helmut Giese)
Newsgroups: comp.lang.tcl
Subject: Re: Overwrite mode?
Date: Thu, 19 Oct 2023 20:31:37 +0200
Organization: ratiosoft
Lines: 53
Message-ID: <6os2jilupua0ff0m76v4g9rbekh3cj5gfj@4ax.com>
References: <9vsvii5llvhfcc1huq6crci9ns3cqgha69@4ax.com> <ugqa7i$51ei$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="c3069c3a0a7c59c3df3434c085458130";
logging-data="538259"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/67kaxOz07BFb8Ryo34pw6"
Cancel-Lock: sha1:rUwfZZtca4nG86JxMjCkATWf8q8=
X-Newsreader: Forte Free Agent 1.93/32.576 English (American)
 by: Helmut Giese - Thu, 19 Oct 2023 18:31 UTC

Hello et99,
an interesting approach, but I didn't plan to change the behaviour of
all widgets. Meanwhile I found a solution for my problem which was:
- I have a very small entry ( just 2 chars wide)
- When the user starts entering a new value the former content gets
shifted out - which the user might not realize.
- When the editing is over the new content is truncated to the last 2
digits - which the user might still not realize.
My solution was
- to enlarge the width of the entry a bit so that the former content
is still visible and
- on finishing the (new) value is for a moment turned red which should
alert all but the most ignorant user.

Thanks for giving my problem a thought, I appreciate
Helmut

>On 10/18/2023 8:07 AM, Helmut Giese wrote:
>> Hello out there,
>> is it possible to set an entry to 'overwrite' mode instead of 'insert'
>> mode? I haven't found anything in the docs.
>> Any help will be greatly appreciated
>> Helmut
>In the FWIW dept. if you like quick hacks, and/or you want to modify all entry widgets, the following is the code (with a mod) that handles inserting characters and is bound to <Key> in the Entry class:
>
>proc ::tk::EntryInsert {w s} {
> puts "insert into $w /$s/"
> if {$s eq ""} {
> return
> }
> catch {
> set insert [$w index insert]
> if {([$w index sel.first] <= $insert)
> && ([$w index sel.last] >= $insert)} {
> $w delete sel.first sel.last
> }
> }
> $w insert insert $s
> $w delete insert ;# makes this write over mode
> EntrySeeInsert $w
>}
>
>By adding the above
>
>$w delete insert
>
>you can make all entry widgets be overwrite mode. Maybe there should be a config parameter in entry and then make that conditional per widget by perhaps,
>
>if [$w cget -writeover] {
> $w delete insert
>}
>

Re: Overwrite mode?

<ugru6f$gnvo$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=12622&group=comp.lang.tcl#12622

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: wortkarg3@yahoo.com (Harald Oehlmann)
Newsgroups: comp.lang.tcl
Subject: Re: Overwrite mode?
Date: Thu, 19 Oct 2023 20:57:20 +0200
Organization: A noiseless patient Spider
Lines: 61
Message-ID: <ugru6f$gnvo$1@dont-email.me>
References: <9vsvii5llvhfcc1huq6crci9ns3cqgha69@4ax.com>
<ugqa7i$51ei$1@dont-email.me> <6os2jilupua0ff0m76v4g9rbekh3cj5gfj@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 19 Oct 2023 18:57:19 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ecc602e20dcd7a11be7c7bd96671d717";
logging-data="548856"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19CyZUDbXKKgmUeBBodclvx"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:2BrBnVXhObTpDFKV22Txnk+iDs8=
In-Reply-To: <6os2jilupua0ff0m76v4g9rbekh3cj5gfj@4ax.com>
Content-Language: en-GB
 by: Harald Oehlmann - Thu, 19 Oct 2023 18:57 UTC

Am 19.10.2023 um 20:31 schrieb Helmut Giese:
> Hello et99,
> an interesting approach, but I didn't plan to change the behaviour of
> all widgets. Meanwhile I found a solution for my problem which was:
> - I have a very small entry ( just 2 chars wide)
> - When the user starts entering a new value the former content gets
> shifted out - which the user might not realize.
> - When the editing is over the new content is truncated to the last 2
> digits - which the user might still not realize.
> My solution was
> - to enlarge the width of the entry a bit so that the former content
> is still visible and
> - on finishing the (new) value is for a moment turned red which should
> alert all but the most ignorant user.
>
> Thanks for giving my problem a thought, I appreciate
> Helmut
>
>> On 10/18/2023 8:07 AM, Helmut Giese wrote:
>>> Hello out there,
>>> is it possible to set an entry to 'overwrite' mode instead of 'insert'
>>> mode? I haven't found anything in the docs.
>>> Any help will be greatly appreciated
>>> Helmut
>> In the FWIW dept. if you like quick hacks, and/or you want to modify all entry widgets, the following is the code (with a mod) that handles inserting characters and is bound to <Key> in the Entry class:
>>
>> proc ::tk::EntryInsert {w s} {
>> puts "insert into $w /$s/"
>> if {$s eq ""} {
>> return
>> }
>> catch {
>> set insert [$w index insert]
>> if {([$w index sel.first] <= $insert)
>> && ([$w index sel.last] >= $insert)} {
>> $w delete sel.first sel.last
>> }
>> }
>> $w insert insert $s
>> $w delete insert ;# makes this write over mode
>> EntrySeeInsert $w
>> }
>>
>> By adding the above
>>
>> $w delete insert
>>
>> you can make all entry widgets be overwrite mode. Maybe there should be a config parameter in entry and then make that conditional per widget by perhaps,
>>
>> if [$w cget -writeover] {
>> $w delete insert
>> }
>>
>

What I do is to select the contents, so, it is replaced on next key press

$wi select 0 end

Take care,
Harald

Re: Overwrite mode?

<ugrudn$gnvo$2@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=12623&group=comp.lang.tcl#12623

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: wortkarg3@yahoo.com (Harald Oehlmann)
Newsgroups: comp.lang.tcl
Subject: Re: Overwrite mode?
Date: Thu, 19 Oct 2023 21:01:13 +0200
Organization: A noiseless patient Spider
Lines: 71
Message-ID: <ugrudn$gnvo$2@dont-email.me>
References: <9vsvii5llvhfcc1huq6crci9ns3cqgha69@4ax.com>
<ugqa7i$51ei$1@dont-email.me> <6os2jilupua0ff0m76v4g9rbekh3cj5gfj@4ax.com>
<ugru6f$gnvo$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 19 Oct 2023 19:01:11 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ecc602e20dcd7a11be7c7bd96671d717";
logging-data="548856"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/jERR9GYFFTUuDXMg4R2g3"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:JwUndac0DZQufLy9HKNKoVsUzuc=
Content-Language: en-GB
In-Reply-To: <ugru6f$gnvo$1@dont-email.me>
 by: Harald Oehlmann - Thu, 19 Oct 2023 19:01 UTC

Am 19.10.2023 um 20:57 schrieb Harald Oehlmann:
> Am 19.10.2023 um 20:31 schrieb Helmut Giese:
>> Hello et99,
>> an interesting approach, but I didn't plan to change the behaviour of
>> all widgets. Meanwhile I found a solution for my problem which was:
>> - I have a very small entry ( just 2 chars wide)
>> - When the user starts entering a new value the former content gets
>> shifted out - which the user might not realize.
>> - When the editing is over the new content is truncated to the last 2
>> digits - which the user might still not realize.
>> My solution was
>> - to enlarge the width of the entry a bit so that the former content
>> is still visible and
>> - on finishing the (new) value is for a moment turned red which should
>> alert all but the most ignorant user.
>>
>> Thanks for giving my problem a thought, I appreciate
>> Helmut
>>
>>> On 10/18/2023 8:07 AM, Helmut Giese wrote:
>>>> Hello out there,
>>>> is it possible to set an entry to 'overwrite' mode instead of 'insert'
>>>> mode? I haven't found anything in the docs.
>>>> Any help will be greatly appreciated
>>>> Helmut
>>> In the FWIW dept. if you like quick hacks, and/or you want to modify
>>> all entry widgets, the following is the code (with a mod) that
>>> handles inserting characters  and is bound to <Key> in the Entry class:
>>>
>>> proc ::tk::EntryInsert {w s} {
>>>      puts "insert into $w /$s/"
>>>      if {$s eq ""} {
>>>          return
>>>      }
>>>      catch {
>>>          set insert [$w index insert]
>>>          if {([$w index sel.first] <= $insert)
>>>              && ([$w index sel.last] >= $insert)} {
>>>              $w delete sel.first sel.last
>>>          }
>>>      }
>>>      $w insert insert $s
>>>      $w delete insert ;# makes this write over mode
>>>      EntrySeeInsert $w
>>> }
>>>
>>> By adding the above
>>>
>>> $w delete insert
>>>
>>> you can make all entry widgets be overwrite mode. Maybe there should
>>> be a config parameter in entry and then make that conditional per
>>> widget by perhaps,
>>>
>>> if [$w cget -writeover] {
>>>      $w delete insert
>>> }
>>>
>>
>
> What I do is to select the contents, so, it is replaced on next key press
>
> $wi select 0 end
>
> Take care,
> Harald

About your overwrite-approach - you may also use a "-verifycmd, to
always directly cut left, if more characters are typed.

Re: Overwrite mode?

<ma33ji9fktkn0laf2an7lj60mbnhvea2u4@4ax.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=12624&group=comp.lang.tcl#12624

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: hgiese@ratiosoft.com (Helmut Giese)
Newsgroups: comp.lang.tcl
Subject: Re: Overwrite mode?
Date: Thu, 19 Oct 2023 22:14:26 +0200
Organization: ratiosoft
Lines: 13
Message-ID: <ma33ji9fktkn0laf2an7lj60mbnhvea2u4@4ax.com>
References: <9vsvii5llvhfcc1huq6crci9ns3cqgha69@4ax.com> <ugqa7i$51ei$1@dont-email.me> <6os2jilupua0ff0m76v4g9rbekh3cj5gfj@4ax.com> <ugru6f$gnvo$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="c3069c3a0a7c59c3df3434c085458130";
logging-data="584618"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Rp1I/KZ7lTbdJmxkdZaVe"
Cancel-Lock: sha1:VvtccD5bxPg+xb7KkmA1O/2cCT8=
X-Newsreader: Forte Free Agent 1.93/32.576 English (American)
 by: Helmut Giese - Thu, 19 Oct 2023 20:14 UTC

Hello Harald,
hey, that's a cool idea. Yeah, I think I will do this - and leave the
'turn red for a moment' thing in, too.
Thank you for this cute idea.
Helmut
>
>What I do is to select the contents, so, it is replaced on next key press
>
>$wi select 0 end
>
>Take care,
>Harald

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor