Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

The universe seems neither benign nor hostile, merely indifferent. -- Sagan


devel / comp.lang.tcl / crosshair

SubjectAuthor
* crosshairAdrien Peulvast
+- crosshairAdrien Peulvast
`* crosshairGerald Lester
 `- crosshairAdrien Peulvast

1
crosshair

<tncl6d$75i$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!aioe.org!bJRC8AMvZZCtjVXtr28shg.user.46.165.242.75.POSTED!not-for-mail
From: adrien.p...@hotmail.com (Adrien Peulvast)
Newsgroups: comp.lang.tcl
Subject: crosshair
Date: Wed, 14 Dec 2022 22:04:59 +0800
Organization: Aioe.org NNTP Server
Message-ID: <tncl6d$75i$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable
Injection-Info: gioia.aioe.org; logging-data="7346"; posting-host="bJRC8AMvZZCtjVXtr28shg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.5.1
X-Notice: Filtered by postfilter v. 0.9.2
X-Antivirus-Status: Clean
Content-Language: fr
X-Antivirus: Avast (VPS 221214-2, 14/12/2022), Outbound message
 by: Adrien Peulvast - Wed, 14 Dec 2022 14:04 UTC

Hello Community,

I found a bug in the "crosshair" package 1.2 (part of tklib):
File crosshair.tcl, in the function "::crosshair::Unhide" , line 6:
"set opts(hidden) 1"

is only defined as local variable, so has no effect to hide the
crosshair when the mouse leaves the canvas. The crosshair is still
displayed. It occurs from the second time the cursor leaves the canvas,
so maybe it's why it was missed during tests.

I propose the following correction (add 2 lines after line 6):
# Store changes back.
set config($w) [array get opts]

full function:

proc ::crosshair::Unhide { w x y } {
variable config
if { ![info exists config($w)] } return
array set opts $config($w)

# Already unhidden, do nothing
if { !$opts(hidden) } return
set opts(hidden) 0

# Store changes back.
set config($w) [array get opts]

# Recreate cross-hair. This takes the bounding boxes, if any, into
# account, i.e. if we are out of bounds nothing will appear.
Move $w $x $y
return
}

so the config array is updated, the crosshair is hidden when the mouse
cursor leaves the canvas.

Someone to look at it and confirm ?

Thanks !

--
Cet e-mail a été vérifié par le logiciel antivirus d'Avast.
www.avast.com

Re: crosshair

<tnclbv$75i$2@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!aioe.org!bJRC8AMvZZCtjVXtr28shg.user.46.165.242.75.POSTED!not-for-mail
From: adrien.p...@hotmail.com (Adrien Peulvast)
Newsgroups: comp.lang.tcl
Subject: Re: crosshair
Date: Wed, 14 Dec 2022 22:07:59 +0800
Organization: Aioe.org NNTP Server
Message-ID: <tnclbv$75i$2@gioia.aioe.org>
References: <tncl6d$75i$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="7346"; posting-host="bJRC8AMvZZCtjVXtr28shg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.5.1
X-Antivirus: Avast (VPS 221214-2, 14/12/2022), Outbound message
Content-Language: fr
X-Antivirus-Status: Clean
X-Notice: Filtered by postfilter v. 0.9.2
 by: Adrien Peulvast - Wed, 14 Dec 2022 14:07 UTC

Le 14/12/2022 à 22:04, Adrien Peulvast a écrit :
> Hello Community,
>
> I found a bug in the "crosshair" package 1.2 (part of tklib):
> File crosshair.tcl, in the function "::crosshair::Unhide" , line 6:
> "set opts(hidden) 1"
>
> is only defined as local variable, so has no effect to hide the
> crosshair when the mouse leaves the canvas. The crosshair is still
> displayed. It occurs from the second time the cursor leaves the canvas,
> so maybe it's why it was missed during tests.
>
> I propose the following correction (add 2 lines after line 6):
> # Store changes back.
> set config($w) [array get opts]
>
> full function:
>
> proc ::crosshair::Unhide { w x y } {
>     variable config
>     if { ![info exists config($w)] } return
>     array set opts $config($w)
>
>     # Already unhidden, do nothing
>     if { !$opts(hidden) } return
>     set opts(hidden) 0
>
>     # Store changes back.
>     set config($w) [array get opts]
>
>     # Recreate cross-hair. This takes the bounding boxes, if any, into
>     # account, i.e. if we are out of bounds nothing will appear.
>     Move $w $x $y
>     return
> }
>
> so the config array is updated, the crosshair is hidden when the mouse
> cursor leaves the canvas.
>
> Someone to look at it and confirm ?
>
> Thanks !
>
>
edit : the line 6 in function is :
"set opts(hidden) 0"

--
Cet e-mail a été vérifié par le logiciel antivirus d'Avast.
www.avast.com

Re: crosshair

<tncloe$dkf$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!aioe.org!cyYmgbPtHI7TTaTXygiZ9w.user.46.165.242.75.POSTED!not-for-mail
From: Gerald.L...@KnG-Consulting.net (Gerald Lester)
Newsgroups: comp.lang.tcl
Subject: Re: crosshair
Date: Wed, 14 Dec 2022 08:14:38 -0600
Organization: KnG Consulting, LLC
Message-ID: <tncloe$dkf$1@gioia.aioe.org>
References: <tncl6d$75i$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="13967"; posting-host="cyYmgbPtHI7TTaTXygiZ9w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.4.2
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Gerald Lester - Wed, 14 Dec 2022 14:14 UTC

On 12/14/22 08:04, Adrien Peulvast wrote:
> Hello Community,
>
> I found a bug in the "crosshair" package 1.2 (part of tklib):
> File crosshair.tcl, in the function "::crosshair::Unhide" , line 6:
> "set opts(hidden) 1"
>
> is only defined as local variable, so has no effect to hide the
> crosshair when the mouse leaves the canvas. The crosshair is still
> displayed. It occurs from the second time the cursor leaves the canvas,
> so maybe it's why it was missed during tests.
>
> I propose the following correction (add 2 lines after line 6):
> # Store changes back.
> set config($w) [array get opts]
>
> full function:
>
> proc ::crosshair::Unhide { w x y } {
>     variable config
>     if { ![info exists config($w)] } return
>     array set opts $config($w)
>
>     # Already unhidden, do nothing
>     if { !$opts(hidden) } return
>     set opts(hidden) 0
>
>     # Store changes back.
>     set config($w) [array get opts]
>
>     # Recreate cross-hair. This takes the bounding boxes, if any, into
>     # account, i.e. if we are out of bounds nothing will appear.
>     Move $w $x $y
>     return
> }
>
> so the config array is updated, the crosshair is hidden when the mouse
> cursor leaves the canvas.
>
> Someone to look at it and confirm ?
>
> Thanks !

May I suggest that you go to the Fossil repo and create a ticket and
submit a fix.

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

Re: crosshair

<tncn1f$149l$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!aioe.org!bJRC8AMvZZCtjVXtr28shg.user.46.165.242.75.POSTED!not-for-mail
From: adrien.p...@hotmail.com (Adrien Peulvast)
Newsgroups: comp.lang.tcl
Subject: Re: crosshair
Date: Wed, 14 Dec 2022 22:36:30 +0800
Organization: Aioe.org NNTP Server
Message-ID: <tncn1f$149l$1@gioia.aioe.org>
References: <tncl6d$75i$1@gioia.aioe.org> <tncloe$dkf$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="37173"; posting-host="bJRC8AMvZZCtjVXtr28shg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.5.1
Content-Language: fr
X-Notice: Filtered by postfilter v. 0.9.2
X-Antivirus-Status: Clean
X-Antivirus: Avast (VPS 221214-2, 14/12/2022), Outbound message
 by: Adrien Peulvast - Wed, 14 Dec 2022 14:36 UTC

Le 14/12/2022 à 22:14, Gerald Lester a écrit :
> On 12/14/22 08:04, Adrien Peulvast wrote:
>> Hello Community,
>>
>> I found a bug in the "crosshair" package 1.2 (part of tklib):
>> File crosshair.tcl, in the function "::crosshair::Unhide" , line 6:
>> "set opts(hidden) 1"
>>
>> is only defined as local variable, so has no effect to hide the
>> crosshair when the mouse leaves the canvas. The crosshair is still
>> displayed. It occurs from the second time the cursor leaves the
>> canvas, so maybe it's why it was missed during tests.
>>
>> I propose the following correction (add 2 lines after line 6):
>> # Store changes back.
>> set config($w) [array get opts]
>>
>> full function:
>>
>> proc ::crosshair::Unhide { w x y } {
>>      variable config
>>      if { ![info exists config($w)] } return
>>      array set opts $config($w)
>>
>>      # Already unhidden, do nothing
>>      if { !$opts(hidden) } return
>>      set opts(hidden) 0
>>
>>      # Store changes back.
>>      set config($w) [array get opts]
>>
>>      # Recreate cross-hair. This takes the bounding boxes, if any, into
>>      # account, i.e. if we are out of bounds nothing will appear.
>>      Move $w $x $y
>>      return
>> }
>>
>> so the config array is updated, the crosshair is hidden when the mouse
>> cursor leaves the canvas.
>>
>> Someone to look at it and confirm ?
>>
>> Thanks !
>
> May I suggest that you go to the Fossil repo and create a ticket and
> submit a fix.
>
OK, done

--
Cet e-mail a été vérifié par le logiciel antivirus d'Avast.
www.avast.com

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor