Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Computers don't actually think. You just think they think. (We think.)


devel / comp.lang.tcl / toplevel bind

SubjectAuthor
* toplevel bindManfred Stelzhammer
`* Re: toplevel bindRalf Fassel
 `- Re: toplevel bindManfred Stelzhammer

1
toplevel bind

<urv5ic$1s84j$1@dont-email.me>

  copy mid

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

  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: manf...@antispam.at (Manfred Stelzhammer)
Newsgroups: comp.lang.tcl
Subject: toplevel bind
Date: Sat, 2 Mar 2024 13:20:28 +0100
Organization: A noiseless patient Spider
Lines: 42
Message-ID: <urv5ic$1s84j$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 2 Mar 2024 12:20:28 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="8e61b5581b0d4082a82b77442780828a";
logging-data="1974419"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/MlbO749D35un6RHSczejFx8kJYFurebA="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:+nCsTpzE+vU0LwjwcPXqYbos5kw=
Content-Language: de-AT-frami
 by: Manfred Stelzhammer - Sat, 2 Mar 2024 12:20 UTC

Hello

###

% wm geometry . 400x400
% . configure -background yellow

% pack [frame .f1 -container 1] -fill both -expand yes
% toplevel .top1 -use [winfo id .f1] -background red
% bind .top1 <Destroy> "puts {DESTROY .top1}"

% pack [frame .top1.f2 -container 1] -fill both -expand yes

% toplevel .top2 -use [winfo id .top1.f2] -background green
% bind .top2 <Destroy> "puts {DESTROY .top2}"

% destroy .top2

## if I destroy .top2 then the output is:
% DESTROY .top2
% DESTROY .top1

Why, I only destroy .top2 I think I only should get:
% DESTROY .top2

## If I run:
% winfo exist .top1
## I get:
% 1

##

It this a normal behavior?

Regards

Manfred

Re: toplevel bind

<ygah6hmkm23.fsf@panther.akutech-local.de>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: ralf...@gmx.de (Ralf Fassel)
Newsgroups: comp.lang.tcl
Subject: Re: toplevel bind
Date: Mon, 04 Mar 2024 17:18:28 +0100
Lines: 28
Message-ID: <ygah6hmkm23.fsf@panther.akutech-local.de>
References: <urv5ic$1s84j$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: individual.net Sg9uPNUXgY/Ot+d4i4oqSAJfGGA5pPVMSE8jC9OQ577gLbhrw=
Cancel-Lock: sha1:thhhGhgUFomY+yMSN/UpQFBWaAc= sha1:h2c3ueQ1bKV7Z2s0E/d9KKgD9Dc= sha256:ytXTX5ag64KWO78IIO3qsByzl1x3r0UXEajM4eb8jsA=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
 by: Ralf Fassel - Mon, 4 Mar 2024 16:18 UTC

* Manfred Stelzhammer <manfred@antispam.at>
| % wm geometry . 400x400
| % . configure -background yellow
>
| % pack [frame .f1 -container 1] -fill both -expand yes
| % toplevel .top1 -use [winfo id .f1] -background red
| % bind .top1 <Destroy> "puts {DESTROY .top1}"
>
| % pack [frame .top1.f2 -container 1] -fill both -expand yes
>
| % toplevel .top2 -use [winfo id .top1.f2] -background green
| % bind .top2 <Destroy> "puts {DESTROY .top2}"

Make both bindings use %W to see which widget exactly gets the event:

bind .top1 <Destroy> "puts {DESTROY top1/%W}"
bind .top2 <Destroy> "puts {DESTROY top2/%W}"

=>
destroy .top2
DESTROY top2/.top2
DESTROY top1/.top1.f2

So, destroying .top2 alse destroys .top1.f2, but not .top1.
I have not checked the details of -container and -use, so I can't
comment on whether that is to be expected...

R'

Re: toplevel bind

<us5d55$3bfuh$1@dont-email.me>

  copy mid

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

  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: manf...@antispam.at (Manfred Stelzhammer)
Newsgroups: comp.lang.tcl
Subject: Re: toplevel bind
Date: Mon, 4 Mar 2024 22:06:45 +0100
Organization: A noiseless patient Spider
Lines: 46
Message-ID: <us5d55$3bfuh$1@dont-email.me>
References: <urv5ic$1s84j$1@dont-email.me>
<ygah6hmkm23.fsf@panther.akutech-local.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 4 Mar 2024 21:06:45 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7dc4e86c0af6f3f704eb18bde7ef8048";
logging-data="3522513"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18FXnmFrQBL7yWlncyMyeQ8AgtkfxHFp4U="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:c9lkJRmP0YlzhI+kaEo3GaZPgx0=
In-Reply-To: <ygah6hmkm23.fsf@panther.akutech-local.de>
Content-Language: de-AT-frami
 by: Manfred Stelzhammer - Mon, 4 Mar 2024 21:06 UTC

Thank's

I know that .top1 isn't destroyed, "Puts {DESTROY .top1}" is only for
testing.
It looks like .top1 was destroyed, but it wasn't, but the event was
triggerd.

Now I use
wm protocol .top1 WM_DELETE_WINDOW "puts {DESTROY .top1}"
wm protocol .top1 WM_DELETE_WINDOW "puts {DESTROY .top2}"

This work for me like expected.

regards

Manfred

Am 04.03.24 um 17:18 schrieb Ralf Fassel:
> * Manfred Stelzhammer <manfred@antispam.at>
> | % wm geometry . 400x400
> | % . configure -background yellow
>>
> | % pack [frame .f1 -container 1] -fill both -expand yes
> | % toplevel .top1 -use [winfo id .f1] -background red
> | % bind .top1 <Destroy> "puts {DESTROY .top1}"
>>
> | % pack [frame .top1.f2 -container 1] -fill both -expand yes
>>
> | % toplevel .top2 -use [winfo id .top1.f2] -background green
> | % bind .top2 <Destroy> "puts {DESTROY .top2}"
>
> Make both bindings use %W to see which widget exactly gets the event:
>
> bind .top1 <Destroy> "puts {DESTROY top1/%W}"
> bind .top2 <Destroy> "puts {DESTROY top2/%W}"
>
> =>
> destroy .top2
> DESTROY top2/.top2
> DESTROY top1/.top1.f2
>
> So, destroying .top2 alse destroys .top1.f2, but not .top1.
> I have not checked the details of -container and -use, so I can't
> comment on whether that is to be expected...
>
> R'

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor