On 26 Feb 2012, at 23:31, address@hidden wrote:
> Op Zo, 26 februari, 2012 9:40 pm schreef Hans Aberg:
>> In Xcode, there are templates which can be used to create projects.
>> Templates are normally not saved to, but there probably is some way to
>> create them. Projects are what one normally works with, containing
>> information about which files are included, how to compile, etc.
>>
>> So following that, one might have an option -template <file>, which looks
>> for template files also in say ~/share/xboard/ and
>> /usr/local/share/xboard/. Templates should not be saved to, but there
>> should be a way to create them.
>>
>> Then an option -project <file>, which just looks for the file in a single
>> location, and saves certain data when changed.
>>
>> Xboard might then have such templates in /usr/local/share/xboard/ for
>> variants.
>>
>> This approach is also similar to that of Bison, which has skeleton files
>> in /usr/local/share/bison/ for different output languages, etc. They are
>> processed using M4.
>
> Well, XBoard already allows you to do such things with the -ini <file>
> option. This is equivalent to the -project you propose, because it reads
> the settings from the file, and then later saves them back on it.
>
> To achieve the effect of your -template option, one just specifies
> different settings files for loading and saving:
>
> xboard -ini <template> -saveSettingsFile <project>
>
> The latter option only changes the name to save on, without reading the
> file, and even does that when the file did not exist. The -ini option
> reads the file, and sets the save name (but only if the file existed), but
> the save name is later overruled. (Last option wins in case of multiply
> defined settings.)
It depends on what type of GUI behavior you want. If it should be possible
to run several main windows at the same time, only data common to those
should be saved in .xboardrc. The other stuff should be in project files.
> I guess a text-edit in a menu dialog could be made to alter the save name
> during the session. (e.g. in the save options dialog; this would just
> require adding a line in the saveOptions array in xoptions.c). Then you
> would only have to specify the template on the command line. (You could
> also have specified it as "@<template>"; then it would not have altered
> the save name to begin with.)
That was also the idea in the before mentioned Hugs4Mac. If I remember it
correctly, one could create a .<init> file in the working directory by
making an explicit save in the program. The format was then made for
simple editing, but mostly, one would not need to use that.
Some inputs:-)
* If the main window is not the top window, then keyboard shortcuts do not
work. So other windows might pass key strokes they cannot handle to the
main window.
* If one is editing a game, Mode -> Edit Game, say it it is white's turn,
and selects Mode -> Machine Black, then there is a pop-up window saying
"It is not Blacks turn". I would have expected it to accept it, and start
the engine when white has moved.
* Similarly, if Mode -> Two Machines is selected, I would want to be able
to switch to Machine White/Black. If white is thinking, then selecting
Machine Black would simply cause white to stop, leaving it to the user;
selecting Machine White, would make it continue thinking, and stop when
white has moved.
* When Two Machines is selected, the clocks are reset. I use to play a few
moves, let the engines play as single opponent or both engines to see if I
can produce some advantage and then let the engines decide the outcome. So
it is then more unclear what the clocks should be set to: sometimes they
should not be changed. Sometimes my thinking may take to much time, so
resetting or adding some time to some clock might be useful.
* When Two Machines are running, then Pause does not pause the engines,
only allows one to move around in the past game. For the purpose of doing
some other CPU intense task, I would also like to be able to suspend the
engines and clocks when doing, and then continue with Xboard later.
* I used to use Sigma Chess, which does not run on the OS X 10.7 I am
running.
http://www.sigmachess.com/
http://www.sigmachess.com/_screenshots/gamewin.jpg
On the second link, the screen shot, you can see that it has under the
chess board a triangular button marked Go, in the location where you have
a "P" in Xboard. It causes the engine to start to make a move for whoever
is in turn. This is a very useful button. If one has several engines
available, one might want to be able to choose, to see what they think
about a position.
* I tend to think that info about the 50 move rule (plies from the last
irreversible move) and 3 repetition draw repetition move should (also) be
displayed in the main window, as it is defines the state of the game
position (like probably castling and en passant, as well). Adding that
info might force another line below the line with past moves.
Hans