saveSettingsOnExit Option

Discussions about the WinBoard protocol. Here you can also report bugs and request new features.

Moderators: hgm, Andres Valverde

saveSettingsOnExit Option

Postby Brian Richardson » 27 Aug 2008, 04:18

Perhaps this is as was intended, but not all of the Winboard options get saved on exit (or save now).

For example, /firstTimeOdds

I have noticed this for a while, so I'm not sure which of the enhanced versions started the trend, but it is in 4.3.14k

Thanks,
Brian
Brian Richardson
 
Posts: 42
Joined: 01 Oct 2004, 05:22

Re: saveSettingsOnExit Option

Postby H.G.Muller » 27 Aug 2008, 07:07

This was indeed intended. Not all settings are saved in the winboard.ini file. Some settings, likely to be one-time events, are exempted. This was already true in WinBoard 4.2.7, and applies for instance to the -variant option: you always start with normal Chess. It also applied to -firstChessProgram and -secondChessProgram: when not giving those on the command line (and not explicitly stating that you wanted to play without Chess programs) you would always get the startup dialog to ask for the Chess-program name(s), and never the same program as you used last time.

I considered the time odds something that typically depends on the engine you run, it makes little sense to give A time odds when it plays B with white, and in the next game B time odds when A has black. So I grouped it with the 'volatile' options. Normally such options would be passed to WinBoard by the Tournament Manager on a per-game basis. The 'WBopt' feature in the engine startup line can be used for this without the TM being even aware that it happens (so that it should work with any TM).

Note that there is a case where I am in doubt: there is a group of settings which has a default value which makes it dependent on other options. For instance -boardHeight and -boardWidth. The default (-1), means basically that there is no default, but that the setting varies according to what is default for the selected variant. (So in normal Chess you get an 8x8 board, in xiangqi you get 9x10, etc.) These options almost never have to be used, but I do save their settings in the winboard.ini. Perhaps this is a mistake; if you ever used them to play, say, Capablanca Chess on an 10x10 board (rather than the normal 10x8), the next time you start WinBoard you would start in normal Chess, (as the -variant was not saved), but with a 10x10 board! The options can be changed through the menu. though, so it is not disastrous. But perhaps it should be better to not save settings that are expected to be dependent on other settings that are also not saved.

Note that you can see in this list which (new) options are supposed to be saved, and which not, in the current version: the saved options are marked with an asterisk.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: saveSettingsOnExit Option

Postby James Redford » 27 Aug 2008, 19:48

H.G.Muller wrote:This was indeed intended. Not all settings are saved in the winboard.ini file. Some settings, likely to be one-time events, are exempted. This was already true in WinBoard 4.2.7, and applies for instance to the -variant option: you always start with normal Chess. It also applied to -firstChessProgram and -secondChessProgram: when not giving those on the command line (and not explicitly stating that you wanted to play without Chess programs) you would always get the startup dialog to ask for the Chess-program name(s), and never the same program as you used last time.

I considered the time odds something that typically depends on the engine you run, it makes little sense to give A time odds when it plays B with white, and in the next game B time odds when A has black. So I grouped it with the 'volatile' options. Normally such options would be passed to WinBoard by the Tournament Manager on a per-game basis. The 'WBopt' feature in the engine startup line can be used for this without the TM being even aware that it happens (so that it should work with any TM).

Note that there is a case where I am in doubt: there is a group of settings which has a default value which makes it dependent on other options. For instance -boardHeight and -boardWidth. The default (-1), means basically that there is no default, but that the setting varies according to what is default for the selected variant. (So in normal Chess you get an 8x8 board, in xiangqi you get 9x10, etc.) These options almost never have to be used, but I do save their settings in the winboard.ini. Perhaps this is a mistake; if you ever used them to play, say, Capablanca Chess on an 10x10 board (rather than the normal 10x8), the next time you start WinBoard you would start in normal Chess, (as the -variant was not saved), but with a 10x10 board! The options can be changed through the menu. though, so it is not disastrous. But perhaps it should be better to not save settings that are expected to be dependent on other settings that are also not saved.

Note that you can see in this list which (new) options are supposed to be saved, and which not, in the current version: the saved options are marked with an asterisk.


Mr. Muller, I thank you and those involved in this project for this release.

Possibly related to the subject of this thread, I am having a problem with WinBoard 4.3.14k that perhaps you can help me fix. The positions of the windows aren't saved properly between sessions (even though I have the sticky behavior enabled). I haven't ever had this problem with Alessandro Scotti's WinBoard X.

Below is a screenshot of this behavior after WinBoard 4.3.14k is shut down and then restarted:

http://img58.imageshack.us/img58/5015/w ... 4k2az7.png

Whereas the below screenshot shows where I had positioned the windows:

http://img440.imageshack.us/img440/4083 ... 4k1cp8.png

The "Save Settings on Exit" option is enabled, and I also have clicked "Save Settings Now," but this behavior still continues.

Perhaps there is an option in WinBoard 4.3.14k's winboard.ini that requires setting, although as I said, this behavior has never occured with my use of WinBoard X.

I read over the list of user-interface options which you linked to at http://www.open-aurec.com/wbforum/WinBo ... d4314.html , but I found nothing there which seems to address this issue.

I thank you, or anyone else, for help that they can offer in resolving this matter.
James Redford
 
Posts: 8
Joined: 26 Aug 2008, 00:48
Location: U.S.A.

Re: saveSettingsOnExit Option

Postby H.G.Muller » 27 Aug 2008, 21:55

I agree this is very strange. I did not change anything to the WinBoard_x code in this area. I experimented somewhat, and if I make a complex arrangement of 4 windows it is smetimes difficult to stick them all together (e.g. the width might be very subtly different, leaving a 1-pixel gab between A and B when they both stick to C, because A+B= C+1 in width).

The waty WinBoard_x seems to do it is quite simple: it asks the window parameters with a Windows API call, saves those numbers in the winboard.ini, reads them back from there the next time, and uses them in another windows API call to position the windows.

I did notice though, in another context (the popup of the patent-licensing bar in Gothic Chess) that Windows does not always position the window in the place that you request. In particular, if I asked for a window close to the desktop edge, it appeared exactly at the edge, like the desktop edge was sticky. I had to observe a certain minimum distance which was larger than the space I needed, in order to leave a gap open. (IIRC I wanted WinBoard to appear by defaut 12 pixels below the upper desktop edge, to leave room for the license popup should someone select variant gothic later. But on XP this did not work, although it did in Win2k. I had to take a needlessly large gap.

[edit] OK, I guess part of this is my fault, after all. At startup I do alter the coordinates of the main Window if it is too close to the upper-left corner. I remember now I had to do this exactly to make sure the licensing popup appeared. If The window was too close to the left screen edge, it failed to appear. I guess this is what breaks the stickiness.

For now, the only solution is to stay at least 10 pixels away from the left edge, and one title-bar width from the upper edge with all windows. I will find another solution for the license popups, so I can relief this restriction in a future version.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: saveSettingsOnExit Option

Postby James Redford » 28 Aug 2008, 01:33

H.G.Muller wrote:I agree this is very strange. I did not change anything to the WinBoard_x code in this area. I experimented somewhat, and if I make a complex arrangement of 4 windows it is smetimes difficult to stick them all together (e.g. the width might be very subtly different, leaving a 1-pixel gab between A and B when they both stick to C, because A+B= C+1 in width).

The waty WinBoard_x seems to do it is quite simple: it asks the window parameters with a Windows API call, saves those numbers in the winboard.ini, reads them back from there the next time, and uses them in another windows API call to position the windows.

I did notice though, in another context (the popup of the patent-licensing bar in Gothic Chess) that Windows does not always position the window in the place that you request. In particular, if I asked for a window close to the desktop edge, it appeared exactly at the edge, like the desktop edge was sticky. I had to observe a certain minimum distance which was larger than the space I needed, in order to leave a gap open. (IIRC I wanted WinBoard to appear by defaut 12 pixels below the upper desktop edge, to leave room for the license popup should someone select variant gothic later. But on XP this did not work, although it did in Win2k. I had to take a needlessly large gap.

[edit] OK, I guess part of this is my fault, after all. At startup I do alter the coordinates of the main Window if it is too close to the upper-left corner. I remember now I had to do this exactly to make sure the licensing popup appeared. If The window was too close to the left screen edge, it failed to appear. I guess this is what breaks the stickiness.

For now, the only solution is to stay at least 10 pixels away from the left edge, and one title-bar width from the upper edge with all windows. I will find another solution for the license popups, so I can relief this restriction in a future version.


I'm glad you found this behavior on your own, since before your edit the tone of your response was skeptical, and I was just at work in writing up a very detailed reply on this behavior and how it could not be an issue with Windows XP, or really anything other than the program itself. So you've saved me from having to bother with that.

By the way, Mr. Muller, what are these license popups which you speak of? I did not encounter any upon my use of WinBoard 4.3.14k, except when I click the "About WinBoard" menu option, which simply provides copyright claims.
James Redford
 
Posts: 8
Joined: 26 Aug 2008, 00:48
Location: U.S.A.

Re: saveSettingsOnExit Option

Postby H.G.Muller » 28 Aug 2008, 07:35

My tone was skeptical (not towards you, but towards MicroSoft) because there really was a problem in the window placement close to the upper-left corner, that only occurred on my laptop running XP, and not on my other computers running Win2k. This is why I had to forbid positioning of the main window closer than 10 pixel to the left edge at startup, (not realizing it had a bearing on the sticky code, which is located elsewhere) which is what is causing part of the problems now. But the other part of the problem is vertical, and this was intentional (to keep room for the popup.)

The popups I am talking about only appear when you select Gothic Chess or Falcon Chess from the "File -> New Variant..." menu. I gave them the form of a windows title bar of the same width as the main window, displayed immediately above it, to make it not too intrusive. (Basically, what I do is opening a window of zero height.) That the patents should be referenced was a requirement by the patent holders. But it shuld not bother users that never select those variants.

I guess I will change it such tha, when you are too close to the upper edge, the popup will simply cover the title bar of the main window, and have slightly reduced width.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: saveSettingsOnExit Option

Postby Guenther Simon » 28 Aug 2008, 09:06

James Redford wrote:
H.G.Muller wrote:I agree this is very strange. I did not change anything to the WinBoard_x code in this area. I experimented somewhat, and if I make a complex arrangement of 4 windows it is smetimes difficult to stick them all together (e.g. the width might be very subtly different, leaving a 1-pixel gab between A and B when they both stick to C, because A+B= C+1 in width).

The waty WinBoard_x seems to do it is quite simple: it asks the window parameters with a Windows API call, saves those numbers in the winboard.ini, reads them back from there the next time, and uses them in another windows API call to position the windows.

I did notice though, in another context (the popup of the patent-licensing bar in Gothic Chess) that Windows does not always position the window in the place that you request. In particular, if I asked for a window close to the desktop edge, it appeared exactly at the edge, like the desktop edge was sticky. I had to observe a certain minimum distance which was larger than the space I needed, in order to leave a gap open. (IIRC I wanted WinBoard to appear by defaut 12 pixels below the upper desktop edge, to leave room for the license popup should someone select variant gothic later. But on XP this did not work, although it did in Win2k. I had to take a needlessly large gap.

[edit] OK, I guess part of this is my fault, after all. At startup I do alter the coordinates of the main Window if it is too close to the upper-left corner. I remember now I had to do this exactly to make sure the licensing popup appeared. If The window was too close to the left screen edge, it failed to appear. I guess this is what breaks the stickiness.

For now, the only solution is to stay at least 10 pixels away from the left edge, and one title-bar width from the upper edge with all windows. I will find another solution for the license popups, so I can relief this restriction in a future version.


I'm glad you found this behavior on your own, since before your edit the tone of your response was skeptical, and I was just at work in writing up a very detailed reply on this behavior and how it could not be an issue with Windows XP, or really anything other than the program itself. So you've saved me from having to bother with that.

...


I am not so sure about the problem. I had the same already with
Winboard_X on one of my machines and I remember that there was
a little discussion and the conclusion was it was much more a Win
problem. BTW it did occur rarely and I only remember one other
person having the same prob.

Guenther
User avatar
Guenther Simon
 
Posts: 794
Joined: 26 Sep 2004, 19:49
Location: Regensburg, Germany

Re: saveSettingsOnExit Option

Postby Eric Mullins » 18 May 2009, 18:15

H.G.Muller wrote:The popups I am talking about only appear when you select Gothic Chess or Falcon Chess from the "File -> New Variant..." menu. I gave them the form of a windows title bar of the same width as the main window, displayed immediately above it, to make it not too intrusive. (Basically, what I do is opening a window of zero height.) That the patents should be referenced was a requirement by the patent holders. But it shuld not bother users that never select those variants.


Is it necessary to do it that way? My read of the license is it is required somewhere in the program. So can't you just add that info to the about box if compiled with gothic support, instead of having this popup that necessitates ruining certain window positions?
Eric Mullins
 
Posts: 47
Joined: 28 Aug 2008, 04:54
Location: Albuquerque, NM


Return to WinBoard development and bugfixing

Who is online

Users browsing this forum: No registered users and 10 guests