Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

There are never any bugs you haven't found yet.


devel / comp.lang.tcl / get bind information in bound script

SubjectAuthor
* get bind information in bound scriptManfred Rosenberger
`* Re: get bind information in bound scriptnemethi
 `- Re: get bind information in bound scriptManfred Rosenberger

1
get bind information in bound script

<93410d3c-51e3-4404-821f-23ad4dae8b93n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:6214:dac:b0:67f:864b:d573 with SMTP id h12-20020a0562140dac00b0067f864bd573mr1228174qvh.6.1705447606165;
Tue, 16 Jan 2024 15:26:46 -0800 (PST)
X-Received: by 2002:ac8:4043:0:b0:429:f2ae:f1c with SMTP id
j3-20020ac84043000000b00429f2ae0f1cmr33952qtl.3.1705447605896; Tue, 16 Jan
2024 15:26:45 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!usenet.blueworldhosting.com!diablo1.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: Tue, 16 Jan 2024 15:26:45 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=2001:871:9:8360:eda7:1b36:e4c9:1162;
posting-account=WBIY8woAAAC6W65uFLcyTQKuVEZVEu3n
NNTP-Posting-Host: 2001:871:9:8360:eda7:1b36:e4c9:1162
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <93410d3c-51e3-4404-821f-23ad4dae8b93n@googlegroups.com>
Subject: get bind information in bound script
From: manfred....@gmail.com (Manfred Rosenberger)
Injection-Date: Tue, 16 Jan 2024 23:26:46 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2033
 by: Manfred Rosenberger - Tue, 16 Jan 2024 23:26 UTC

listbox .lb -width 30
pack .lb
..lb insert 1 "Element 1"
..lb insert 2 "Element 2"
..lb insert 3 "Element 3"

proc handleSelection {s T} {
# Greife auf den aktuellen Text des ausgewählten Elements in der Listbox zu
set selectedIndex [.lb curselection]
if {$selectedIndex ne ""} {
set selectedText [.lb get $selectedIndex]
# Gib das ausgewählte Element und den Ereignistyp in der Konsole aus
puts "eventState: $s"
puts "eventType: $T <- [lindex [event info] $T]"
puts "Ausgewähltes Element: $selectedText"
}
} bind .lb <<ListboxSelect>> [list handleSelection %W %s %T]

================
eventState: 0
eventType: 35 <-
Ausgewähltes Element: Element 2

.... what das 0 and 35 mean?
.... if these numbers are indices of lists, what does this indices try to tell me?

thanks in advance, Manfred

Re: get bind information in bound script

<uo9173$iv5k$1@tota-refugium.de>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!news.samoylyk.net!news.chmurka.net!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.tota-refugium.de!.POSTED!not-for-mail
From: csaba.ne...@t-online.de (nemethi)
Newsgroups: comp.lang.tcl
Subject: Re: get bind information in bound script
Date: Wed, 17 Jan 2024 18:02:27 +0100
Message-ID: <uo9173$iv5k$1@tota-refugium.de>
References: <93410d3c-51e3-4404-821f-23ad4dae8b93n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 17 Jan 2024 17:02:27 -0000 (UTC)
Injection-Info: tota-refugium.de;
logging-data="621748"; mail-complaints-to="abuse@news.tota-refugium.de"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:ttoio9UyOQaDAKeP1xM3eo4/muw=
Content-Language: en-US
X-User-ID: eJwFwYEBgDAIA7CXREqBcywb/59gEk7jJBhEbOyIdpWbrRS+grlLR+W3y+Y5tBY0+YZPQz8rVhFj
In-Reply-To: <93410d3c-51e3-4404-821f-23ad4dae8b93n@googlegroups.com>
 by: nemethi - Wed, 17 Jan 2024 17:02 UTC

Am 17.01.24 um 00:26 schrieb Manfred Rosenberger:
> listbox .lb -width 30
> pack .lb
> .lb insert 1 "Element 1"
> .lb insert 2 "Element 2"
> .lb insert 3 "Element 3"
>
> proc handleSelection {s T} {
> # Greife auf den aktuellen Text des ausgewählten Elements in der Listbox zu
> set selectedIndex [.lb curselection]
> if {$selectedIndex ne ""} {
> set selectedText [.lb get $selectedIndex]
> # Gib das ausgewählte Element und den Ereignistyp in der Konsole aus
> puts "eventState: $s"
> puts "eventType: $T <- [lindex [event info] $T]"
> puts "Ausgewähltes Element: $selectedText"
> }
> }
> bind .lb <<ListboxSelect>> [list handleSelection %W %s %T]
>
> =================
>
> eventState: 0
> eventType: 35 <-
> Ausgewähltes Element: Element 2
>
> ... what das 0 and 35 mean?
> ... if these numbers are indices of lists, what does this indices try to tell me?
>
> thanks in advance, Manfred

The %T event field holds the event's type, like KeyPress, KeyRelease,
ButtonPress, ButtonRelease, etc., where these numerical constants are
defined in the file xlib/X11/X.h as follows:

#define KeyPress 2
#define KeyRelease 3
#define ButtonPress 4
#define ButtonRelease 5
....
#define MappingNotify 34
....

In case of a virtual event, the type is defined in the file generic/tk.h as

#define VirtualEvent (MappingNotify + 1)

which results in 35.

The %s event field holds the state field from the event. For example,
on my Linux box, for a pure ButtonPress event its value is 16 = 0x10,
for ButtonPress with the Shift key down it is 17 = 0x11, and so on. For
a virtual event like <<ListboxSelect>>, the state is set to 0.

--
Csaba Nemethi https://www.nemethi.de mailto:csaba.nemethi@t-online.de

Re: get bind information in bound script

<ad315aeb-31b2-4728-97c6-1c861061973bn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:a05:622a:189a:b0:42a:181c:4715 with SMTP id v26-20020a05622a189a00b0042a181c4715mr7361qtc.10.1705530042611;
Wed, 17 Jan 2024 14:20:42 -0800 (PST)
X-Received: by 2002:a05:620a:271f:b0:783:5774:e21e with SMTP id
b31-20020a05620a271f00b007835774e21emr68857qkp.2.1705530042385; Wed, 17 Jan
2024 14:20:42 -0800 (PST)
Path: i2pn2.org!i2pn.org!news.chmurka.net!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Wed, 17 Jan 2024 14:20:42 -0800 (PST)
In-Reply-To: <uo9173$iv5k$1@tota-refugium.de>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:871:9:55b8:14ce:4bca:cc01:3f83;
posting-account=WBIY8woAAAC6W65uFLcyTQKuVEZVEu3n
NNTP-Posting-Host: 2001:871:9:55b8:14ce:4bca:cc01:3f83
References: <93410d3c-51e3-4404-821f-23ad4dae8b93n@googlegroups.com> <uo9173$iv5k$1@tota-refugium.de>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ad315aeb-31b2-4728-97c6-1c861061973bn@googlegroups.com>
Subject: Re: get bind information in bound script
From: manfred....@gmail.com (Manfred Rosenberger)
Injection-Date: Wed, 17 Jan 2024 22:20:42 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Manfred Rosenberger - Wed, 17 Jan 2024 22:20 UTC

interresting!
wouldnt it be better to get the name of the event, then its index in a list?
thanks a lot!
kLg. Manfred

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor