Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Delta: We never make the same mistake three times. -- David Letterman


devel / comp.lang.tcl / Re: Problem with 'event generate'

SubjectAuthor
* Problem with 'event generate'clt.to.davebr
`* Re: Problem with 'event generate'Gerald Lester
 `- Re: Problem with 'event generate'Robert Heller

1
Problem with 'event generate'

<0191654220917@dlp>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: clt.to.davebr@dfgh.net
Newsgroups: comp.lang.tcl
Subject: Problem with 'event generate'
Date: Fri, 03 Jun 22 01:48:37 GMT
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <0191654220917@dlp>
Injection-Info: reader02.eternal-september.org; posting-host="56a0513aadb18f0ee31e285879421ac6";
logging-data="17809"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX193j1Rt2eTPiouf+XFDISvQ"
Cancel-Lock: sha1:nQ9EBjPlIre9WssEfFWWd+012jQ=
 by: clt.to.davebr@dfgh.net - Fri, 3 Jun 2022 01:48 UTC

>>PS: This is with Tcl 8.6.10 on 64 bit Windows 10
>I just found out that if I change <Keypress> to <KeyPress> it produces
>no error - but no visible result either. Any advice anybody?

The binding that inserts a character on a text window is bound to the Text widget class binding tag (Text in this case), not the window binding tag (.t), see

bindtags .t

bind Text <KeyPress>

However

event generate .t ...

apparently only sends the event to the window binding tag (.t) so the bindings to the Text tag are not fired. I'm not sure how you might sent an event to other window binding tags.

You might use the tk::TextInsert command to get the character inserted.

Dave

Re: Problem with 'event generate'

<t7d0ue$cp$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!aioe.org!5uRJWBT0+b/8E5m0YLLMCQ.user.46.165.242.75.POSTED!not-for-mail
From: Gerald.Lester@KnG-Consulting.net (Gerald Lester)
Newsgroups: comp.lang.tcl
Subject: Re: Problem with 'event generate'
Date: Fri, 3 Jun 2022 08:05:17 -0500
Organization: KnG Consulting, LLC
Message-ID: <t7d0ue$cp$1@gioia.aioe.org>
References: <0191654220917@dlp>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="409"; posting-host="5uRJWBT0+b/8E5m0YLLMCQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.8.1
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Gerald Lester - Fri, 3 Jun 2022 13:05 UTC

On 6/2/22 20:48, clt.to.davebr@dfgh.net wrote:
>>> PS: This is with Tcl 8.6.10 on 64 bit Windows 10
>> I just found out that if I change <Keypress> to <KeyPress> it produces
>> no error - but no visible result either. Any advice anybody?
>
> The binding that inserts a character on a text window is bound to the Text widget class binding tag (Text in this case), not the window binding tag (.t), see
>
> bindtags .t
>
> bind Text <KeyPress>
>
> However
>
> event generate .t ...
>
> apparently only sends the event to the window binding tag (.t) so the bindings to the Text tag are not fired. I'm not sure how you might sent an event to other window binding tags.
>
> You might use the tk::TextInsert command to get the character inserted.

Ah, are you sure about that. At least on Linux that is not what I see:
> bindtags .t
..t Text . all
> bind Text
<Shift-Button-5> <Shift-Button-4> <Button-5> <Button-4>
<Shift-MouseWheel> <MouseWheel> <B2-Motion> <Button-2> <Control-Key-h>
<<TkAccentBackspace>> <<TkClearIMEMarkedText>> <<TkEndIMEMarkedText>>
<<TkStartIMEMarkedText>> <Meta-Key-Delete> <Meta-Key-BackSpace>
<Meta-Key-greater> <Meta-Key-less> <Meta-Key-f> <Meta-Key-d>
<Meta-Key-b> <<Redo>> <<Undo>> <Control-Key-t> <Control-Key-o>
<Control-Key-k> <Control-Key-d> <Key-KP_Enter> <Key-Escape>
<Control-Key> <Meta-Key> <Alt-Key> <Key> <Key-Insert> <<PasteSelection>>
<<Clear>> <<Paste>> <<Copy>> <<Cut>> <<SelectNone>> <<SelectAll>>
<Shift-Key-Select> <Control-Shift-Key-space> <Key-Select>
<Control-Key-space> <Key-BackSpace> <Key-Delete> <Key-Return>
<Control-Key-i> <Control-Shift-Key-Tab> <Control-Key-Tab>
<Shift-Key-Tab> <Key-Tab> <Control-Shift-Key-End> <Control-Key-End>
<Control-Shift-Key-Home> <Control-Key-Home> <<SelectLineEnd>>
<<LineEnd>> <<SelectLineStart>> <<LineStart>> <Control-Key-Next>
<Control-Key-Prior> <Shift-Key-Next> <Key-Next> <Shift-Key-Prior>
<Key-Prior> <<SelectNextPara>> <<SelectPrevPara>> <<SelectNextWord>>
<<SelectPrevWord>> <<NextPara>> <<PrevPara>> <<NextWord>> <<PrevWord>>
<<SelectNextLine>> <<SelectPrevLine>> <<SelectNextChar>>
<<SelectPrevChar>> <<NextLine>> <<PrevLine>> <<NextChar>> <<PrevChar>>
<Control-B1-Motion> <Double-Control-Button-1> <Control-Button-1>
<ButtonRelease-1> <B1-Enter> <B1-Leave> <Triple-Shift-Button-1>
<Double-Shift-Button-1> <Shift-Button-1> <Triple-Button-1>
<Double-Button-1> <B1-Motion> <Button-1>
>

There is no <KeyPress> event. There is a <Key> event.

--
+----------------------------------------------------------------------+
| Gerald W. Lester, President, KNG Consulting LLC |
| Email: Gerald.Lester@kng-consulting.net |
+----------------------------------------------------------------------+

Re: Problem with 'event generate'

<3tWdnaQZo55HkQf_nZ2dnUU7-TfNnZ2d@giganews.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!buffer2.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Fri, 03 Jun 2022 08:30:02 -0500
MIME-Version: 1.0
From: heller@deepsoft.com (Robert Heller)
Organization: Deepwoods Software
X-Newsreader: TkNews 3.0 (1.2.12)
Subject: Re: Problem with 'event generate'
In-Reply-To: <t7d0ue$cp$1@gioia.aioe.org>
References: <0191654220917@dlp> <t7d0ue$cp$1@gioia.aioe.org>
Newsgroups: comp.lang.tcl
Content-Type: text/plain;
charset="us-ascii"
Originator: heller@sharky4.deepsoft.com
Message-ID: <3tWdnaQZo55HkQf_nZ2dnUU7-TfNnZ2d@giganews.com>
Date: Fri, 03 Jun 2022 08:30:02 -0500
Lines: 86
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-jZBia/V+akPc76/7zHSi3YikL6Iwwz+Vkwy8Vjpc4kUU2MSpjj4VAbtJs5H487YwIXkpOxEEcPeWpLF!XrKPYiQgMhA3VHUZJgHSKyFpFuDSAQr6l2fv7iyxIgjPmDpVsMUo2dzu81aJ1GQh8cuKfYD1PPSV!yt8=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 5228
 by: Robert Heller - Fri, 3 Jun 2022 13:30 UTC

At Fri, 3 Jun 2022 08:05:17 -0500 Gerald Lester <Gerald.Lester@KnG-Consulting.net> wrote:

>
> On 6/2/22 20:48, clt.to.davebr@dfgh.net wrote:
> >>> PS: This is with Tcl 8.6.10 on 64 bit Windows 10
> >> I just found out that if I change <Keypress> to <KeyPress> it produces
> >> no error - but no visible result either. Any advice anybody?
> >
> > The binding that inserts a character on a text window is bound to the Text widget class binding tag (Text in this case), not the window binding tag (.t), see
> >
> > bindtags .t
> >
> > bind Text <KeyPress>
> >
> > However
> >
> > event generate .t ...
> >
> > apparently only sends the event to the window binding tag (.t) so the bindings to the Text tag are not fired. I'm not sure how you might sent an event to other window binding tags.
> >
> > You might use the tk::TextInsert command to get the character inserted.
>
> Ah, are you sure about that. At least on Linux that is not what I see:
> > bindtags .t
> .t Text . all
> > bind Text
> <Shift-Button-5> <Shift-Button-4> <Button-5> <Button-4>
> <Shift-MouseWheel> <MouseWheel> <B2-Motion> <Button-2> <Control-Key-h>
> <<TkAccentBackspace>> <<TkClearIMEMarkedText>> <<TkEndIMEMarkedText>>
> <<TkStartIMEMarkedText>> <Meta-Key-Delete> <Meta-Key-BackSpace>
> <Meta-Key-greater> <Meta-Key-less> <Meta-Key-f> <Meta-Key-d>
> <Meta-Key-b> <<Redo>> <<Undo>> <Control-Key-t> <Control-Key-o>
> <Control-Key-k> <Control-Key-d> <Key-KP_Enter> <Key-Escape>
> <Control-Key> <Meta-Key> <Alt-Key> <Key> <Key-Insert> <<PasteSelection>>
> <<Clear>> <<Paste>> <<Copy>> <<Cut>> <<SelectNone>> <<SelectAll>>
> <Shift-Key-Select> <Control-Shift-Key-space> <Key-Select>
> <Control-Key-space> <Key-BackSpace> <Key-Delete> <Key-Return>
> <Control-Key-i> <Control-Shift-Key-Tab> <Control-Key-Tab>
> <Shift-Key-Tab> <Key-Tab> <Control-Shift-Key-End> <Control-Key-End>
> <Control-Shift-Key-Home> <Control-Key-Home> <<SelectLineEnd>>
> <<LineEnd>> <<SelectLineStart>> <<LineStart>> <Control-Key-Next>
> <Control-Key-Prior> <Shift-Key-Next> <Key-Next> <Shift-Key-Prior>
> <Key-Prior> <<SelectNextPara>> <<SelectPrevPara>> <<SelectNextWord>>
> <<SelectPrevWord>> <<NextPara>> <<PrevPara>> <<NextWord>> <<PrevWord>>
> <<SelectNextLine>> <<SelectPrevLine>> <<SelectNextChar>>
> <<SelectPrevChar>> <<NextLine>> <<PrevLine>> <<NextChar>> <<PrevChar>>
> <Control-B1-Motion> <Double-Control-Button-1> <Control-Button-1>
> <ButtonRelease-1> <B1-Enter> <B1-Leave> <Triple-Shift-Button-1>
> <Double-Shift-Button-1> <Shift-Button-1> <Triple-Button-1>
> <Double-Button-1> <B1-Motion> <Button-1>
> >
>
> There is no <KeyPress> event. There is a <Key> event.

From man 3tk bind:

EVENT TYPES
The type field may be any of the standard X event types, with a few ex‐
tra abbreviations. The type field will also accept a couple non-stan‐
dard X event types that were added to better support the Macintosh and
Windows platforms. Below is a list of all the valid types; where two
names appear together, they are synonyms.

Activate Destroy Map
ButtonPress, Button Enter MapRequest
ButtonRelease Expose Motion
Circulate FocusIn MouseWheel
CirculateRequest FocusOut Property
Colormap Gravity Reparent
Configure KeyPress, Key ResizeRequest
ConfigureRequest KeyRelease Unmap
Create Leave Visibility
Deactivate

>
>

--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
heller@deepsoft.com -- Webhosting Services


devel / comp.lang.tcl / Re: Problem with 'event generate'

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor