Discussion:
[Scid-users] Bug Fix: piece tracker does not track multiple pieces
Lionel Hampton
2016-09-02 18:47:44 UTC
Permalink
With Scid v4.6.4, using Tcl Version: 8.6.5+dfsg-2, Tk Version: 8.6.5-1
on a Debian Linux dist, the piece tracker is broken when tracking
multiple pieces.

The break came in this commit by Fulvio:
92878f068c57c99c22b63d3cbde927124741e27d

Author: Fulvio <***@libero.it> 2015-03-07 09:35:24
Committer: Fulvio <***@libero.it> 2015-03-08 14:22:29
Parent: e5e4d8d31a01696b3b6d116524da3c03983e1a47 (Framework for tcl/tk
isolation)
Child: 068e63b148b34be97c12119ad6030f75503bd32b (Fix keyboardShortcuts for
text widgets)
Branches: master, remotes/origin/master
Follows: v4.5.2
Precedes: v4.6.1

========

The following <git diff> will point you to the problem (and a solution).

The eval command's internal concat assembles a single-layered
list-constructed command string. Without it, the ::ptrack::select
list is not fully expanded, and only the FIRST element of the list
is passed to sc_base_piecetrack() as part of argv.

Whether there might be a better way to solve the problem
is beyond my grasp of the Tcl language.

(The diff is taken on the v4.6.4 tagged commit vs. my working dir)

========

diff --git a/tcl/tools/ptracker.tcl b/tcl/tools/ptracker.tcl
index e9fda99..56d8065 100644
--- a/tcl/tools/ptracker.tcl
+++ b/tcl/tools/ptracker.tcl
@@ -329,7 +329,7 @@ proc ::ptrack::refresh {{type "all"}} {
if {$::ptrack::mode == "-time"} { set timeMode 1 }

progressBarSet $w.progress 401 21
- set err [catch { sc_base piecetrack $::ptrack::mode \
+ set err [catch { eval sc_base piecetrack $::ptrack::mode \
$::ptrack::moves(start) $::ptrack::moves(end) \
$::ptrack::select} ::ptrack::data]

========
Benoit St-Pierre
2016-09-02 20:01:29 UTC
Permalink
Thanks for the report, Lionel.

Could you describe how you use the piece tracker? I've never used it, and I
should update the documentation.
f***@libero.it
2016-09-04 09:58:01 UTC
Permalink
Many thanks,fixed with:https://sourceforge.net/p/scid/code/ci/ce5ae81eabcab83e1a9bb7da7cd71da5b0746486/




----Messaggio originale----

Da: "Lionel Hampton" <***@gmail.com>

Data: 02/09/2016 20.47

A: <scid-***@lists.sourceforge.net>

Ogg: [Scid-users] Bug Fix: piece tracker does not track multiple pieces




With Scid v4.6.4, using Tcl Version: 8.6.5+dfsg-2, Tk Version: 8.6.5-1 on a Debian Linux dist, the piece tracker is broken when tracking multiple pieces.
Loading...