Main
Date: 15 Oct 2006 12:11:47
From: Dave (from the UK)
Subject: Bug fix for scid
I originally stuck this on rec.games.chess.but thought it had wider
appeal, so have reposted.

------

If you use the free open-source chess database scid,

http://scid.sourceforge.net/

you may have noticed that if you open the "Comment Editor" under the
Tools menu, then try to close it using the Tools menu it does not close,
but generates and error message. You have to select the X in the top
right of the Comment Editor's window to close it instead.

Although I've only tested this under UNIX (Solaris to be precise),
adding the following code should cure that. Just open 'scid' (which is a
text file), in a text editor (Windows notepad should do) and add:

# commenteditor::close added by Dr. David Kirkby on 14th Oct 2006.
proc ::commenteditor::close {} {
set w .commentWin
if {! [winfo exists $w]} { return }
destroy $w
}

and save the file, making sure it is saves as scid and not scid.txt or
similar.

I don't know if it matters exactly where the code it is added (I don't
know how to program in Tcl/Tk) but I did it just before these comments:

# ::commenteditor::Open --
#
# TODO: brief description (abstract)
#
# Arguments:
# none
# Results:
# TODO: detailed description
#

Basically, the code for *opening* the comment editor window is present,
but it was *not* for *closing*, so the window could not be closed in the
same way as other windows. (it could be closed, but perhaps not quite as
conveniently).

I'd be interested if this fix works for others. But make a backup before
you apply it. And as I say, I've only tested this Solaris, but I don't
think it will depend on the platform. So it should work on Linux,
Windows, Mac and whatever else scid works under.

BTW, someone pointed out to me the other day that you can get two chess
engines to play one another inside scid. It's funny to watch crafty and
Toga battle it out !!

Please note, one of the advantages of open-source software such as scid
is that people can apply bug fixes, or develop it further. After getting
fed up with this bug, I decided to fix it myself. Total time to do so
was about 2~3 hours. (Yes I know its only 5 lines, but I don't know
Tcl/Tk and so sorting out what did what was not as quick as it might
have otherwise been).

I don't think Chessbase would fix a bug reported to them that quickly.
In fact, I'm still waiting for them to fix the Pocket Fritz issue </gripe >

--
Dave (from the UK)

Please note my email address changes periodically to avoid spam.
It is always of the form: [email protected]
Hitting reply will work for a few months only - later set it manually.

http://witm.sourceforge.net/ (Web based Mathematica front end)




 
Date: 16 Oct 2006 17:56:28
From: David Richerby
Subject: Re: Bug fix for scid
Dave (from the UK) <[email protected] > wrote:
> I originally stuck this on rec.games.chess.but thought it had wider
> appeal, so have reposted.

You've also mailed it to SCID's maintainers, I trust.

> Although I've only tested this under UNIX (Solaris to be precise),
> adding the following code should cure that. [...] I'd be interested
> if this fix works for others. But make a backup before you apply
> it. And as I say, I've only tested this Solaris, but I don't think
> it will depend on the platform. So it should work on Linux, Windows,
> Mac and whatever else scid works under.

Should do, yes.


Dave.

--
David Richerby Cyber-Widget (TM): it's like a thingy
www.chiark.greenend.org.uk/~davidr/ that exists only in your computer!


  
Date: 16 Oct 2006 23:20:51
From: Dave (from the UK)
Subject: Re: Bug fix for scid
David Richerby wrote:
> Dave (from the UK) <[email protected]> wrote:
>
>>I originally stuck this on rec.games.chess.but thought it had wider
>>appeal, so have reposted.
>
>
> You've also mailed it to SCID's maintainers, I trust.

Development on scid has stopped at the minute - apparently the author
had some illness issues. However, the web site was recently updated, so
I hope Shane gets back to scid's development.

I have sent it to [email protected] mailing list.

>>Although I've only tested this under UNIX (Solaris to be precise),
>>adding the following code should cure that. [...] I'd be interested
>>if this fix works for others. But make a backup before you apply
>>it. And as I say, I've only tested this Solaris, but I don't think
>>it will depend on the platform. So it should work on Linux, Windows,
>>Mac and whatever else scid works under.
>
>
> Should do, yes.

Now I am not so sure.

I think I was *wrong* to say it should work under Windows like this.

It looks to me that the windows version is a .exe, which can't be edited
with a text editor - i.e. it is a binary file. I renamed to scid.exe to
scid.txt and tried opening in notepad, but it is definitely not a text
file.

I don't know much about Tcl/Tk, but I assume it is compiled to a .exe.
under windows. On Solaris, it looks like its interpreted.

teal /export/home/drkirkby % man tclsh
Reformatting page. Please Wait... done

Tcl Applications tclsh(1)

_________________________________________________________________

NAME
tclsh - Simple shell containing Tcl interpreter

SYNOPSIS
tclsh ?fileName arg arg ...?
_________________________________________________________________

DESCRIPTION
Tclsh is a shell-like application that reads Tcl commands
from its standard input or from a file and evaluates them.
If invoked with no arguments then it runs interactively,
reading Tcl commands from standard input and printing com-
mand results and error messages to standard output. It runs

Hence one would probably need some development tools to build a .exe on
Windows.



--
Dave (from the UK)

Please note my email address changes periodically to avoid spam.
It is always of the form: [email protected]
Hitting reply will work for a few months only - later set it manually.

http://witm.sourceforge.net/ (Web based Mathematica front end)


   
Date: 17 Oct 2006 20:35:46
From: Andreas P. Hofmann
Subject: Re: Bug fix for scid
Dave (from the UK) <[email protected] >
wrote:


> Development on scid has stopped at the minute - apparently the author
> had some illness issues.

<http://chessx.sourceforge.net/index.php?page=about >

--
Eppur Si Muove!


    
Date: 17 Oct 2006 22:37:36
From: Dave (from the UK)
Subject: Re: Bug fix for scid
Andreas P. Hofmann wrote:
> Dave (from the UK) <[email protected]>
> wrote:
>
>
>
>>Development on scid has stopped at the minute - apparently the author
>>had some illness issues.
>
>
> <http://chessx.sourceforge.net/index.php?page=about>
>
I had a look, but there are no releases at all. I tried downloading via
CVS, but can't log in (tried anonymous as a password, as well as an
email address).

Next I downloaded the CVS nightly tarball. ~There was no 'configure'
script and nothing that seemed to be very helpful about compiling. If it
ever takes off I'll look, but scid works well.

From what I can see of chessx now (no releases at all), it will have a
long way to catch up with scid.

I would have thought that rather than start a new project (chessx), it
would have been better to build on what is already available for free
with source code - i.e. expand scid, rather than starting from scratch.

--
Dave (from the UK)

Please note my email address changes periodically to avoid spam.
It is always of the form: [email protected]
Hitting reply will work for a few months only - later set it manually.

http://witm.sourceforge.net/ (Web based Mathematica front end)


   
Date: 17 Oct 2006 13:29:57
From: David Richerby
Subject: Re: Bug fix for scid
Dave (from the UK) <[email protected] > wrote:
>David Richerby wrote:
>> Dave (from the UK) <[email protected]> wrote:
>>> I originally stuck this on rec.games.chess.but thought it had wider
>>> appeal, so have reposted.
>>
>> You've also mailed it to SCID's maintainers, I trust.
>
> Development on scid has stopped at the minute - apparently the
> author had some illness issues. However, the web site was recently
> updated, so I hope Shane gets back to scid's development.

Ah -- I was aware that development had stopped. I think I'd
misremembered the website being updated as meaning that development
had restarted.


> I have sent it to [email protected] mailing list.

Good move.


> I don't know much about Tcl/Tk, but I assume it is compiled to a
> .exe. under windows. On Solaris, it looks like its interpreted.

It's interpreted on Unix-like systems, yes. Compiling Tcl sounds
almost as sick as, well, Tcl. :-)


Dave.

--
David Richerby Surprise Bulb (TM): it's like a light
www.chiark.greenend.org.uk/~davidr/ bulb but not like you'd expect!


    
Date: 17 Oct 2006 17:04:53
From: Dave (from the UK)
Subject: Re: Bug fix for scid
David Richerby wrote:

> Ah -- I was aware that development had stopped. I think I'd
> misremembered the website being updated as meaning that development
> had restarted.

I think Shane might just sart again. I don't know if there are any
developers wanting to take on further development. That said, it is very
functional and stable now, so its not a case of needing more bells and
whistles.

>>I have sent it to [email protected] mailing list.
>
>
> Good move.

Almost as good as 1.e4

>
>>I don't know much about Tcl/Tk, but I assume it is compiled to a
>>.exe. under windows. On Solaris, it looks like its interpreted.
>
>
> It's interpreted on Unix-like systems, yes. Compiling Tcl sounds
> almost as sick as, well, Tcl. :-)

I believe now there is a text file. I assume the .exe is the
interpretor. I've not looked at it any more.

Although it now opens/closes from the menu properly, someone else said
he uses the shortcut keys rather than the mouse. So Ctrl-E opens the
Comment editor, but it does not close it. It does all I want, since I
use the menus with the mouse, but I'll look at a more detailed fix.


With all you might say about Tcl, it does allow for the creation of
cross platform graphical applications. I know there are other options
(Qt, GTK), but QT is not completely free. I don't know much about GTK.
Tcl seems to work. I don't know how to program in it, so can't comment
too much on that I guess. But it seems to do a job.
> Dave.
>


--
Dave (from the UK)

Please note my email address changes periodically to avoid spam.
It is always of the form: [email protected]
Hitting reply will work for a few months only - later set it manually.

http://witm.sourceforge.net/ (Web based Mathematica front end)


     
Date: 17 Oct 2006 18:47:32
From: David Richerby
Subject: Re: Bug fix for scid
Dave (from the UK) <[email protected] > wrote:
> David Richerby wrote:
>> Ah -- I was aware that development had stopped. I think I'd
>> misremembered the website being updated as meaning that development
>> had restarted.
>
> I think Shane might just sart again. I don't know if there are any
> developers wanting to take on further development. That said, it is
> very functional and stable now, so its not a case of needing more
> bells and whistles.

Exactly.


>>> I don't know much about Tcl/Tk, but I assume it is compiled to a
>>> .exe. under windows. On Solaris, it looks like its interpreted.
>>
>> It's interpreted on Unix-like systems, yes. Compiling Tcl sounds
>> almost as sick as, well, Tcl. :-)
>
> With all you might say about Tcl, it does allow for the creation of
> cross platform graphical applications. I know there are other
> options (Qt, GTK), but QT is not completely free.

Also, Java.


> I don't know much about GTK. Tcl seems to work. I don't know how to
> program in it, so can't comment too much on that I guess. But it
> seems to do a job.

Sure. And it's often the best tool for the job. My problems with it
are that it's a hideous language (they seem to have decided that
programming languages should look like `command -option1 -option2
-option3') and that, historically, at least, the developers gave not
one hoot to backward compatibility so you often find systems with
several different versions of Tcl installed because programs that
worked with one version don't work with the others.


Dave.

--
David Richerby Incredible Frozen Hat (TM): it's like
www.chiark.greenend.org.uk/~davidr/ a hat but it's frozen in a block of
ice and it'll blow your mind!