bugXBoard - Bugs: bug #27844, Escape sequences in popup messages

 
 

bug #27844: Escape sequences in popup messages

Submitter:  None
Submitted:  Thu 29 Oct 2009 07:58:14 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Assigned to:  None Open/Closed:  Closed
Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 29 Oct 2009 05:17:35 PM UTC, comment #2: 

OK, thanks fo the clarification. I tried to get in LINEFEEDS in my Ubuntu, by escaping them with backslash, but it did not seem to work. But I am a Linux newbie, so I might have done something wrong (Perhaps leaving out quoting makes the difference?) Anyway, 4.4.x supports the escapes in the InitString.

It sounds good to have the "auto-close" feature available. We should mention it in the specs then, though, so that authors know what they will get. I will check how things currently work. I think the mouse handler currently starts with ErrorPopDown()...

There is no need to force an engine to exit after using "tellusererror". Just that it can reserve the right to do so. (A right with it normally has only after receiving "quit".) Some people complained about geting double error popups on a fatal engine error. So I just want to suppress the "exited unexpectedly" fatal-error popup of the GUI in this case. If the engine does not exit, that would not appear anyway, and everything is fine.

H.G.

Anonymous
Thu 29 Oct 2009 04:44:22 PM UTC, comment #1: 

WinBoard converts \n to a real newline in command-line arguments because there is no way to put a real newline in a command-line argument under Windows, whereas under Unix/Linux it's possible.  However it probably makes sense to backport that feature to xboard for convenience, because putting a real newline into the command line is something people may not realize is possible.

I can see that it makes sense in telluser, etc., too.

I think the idea was that telluser should give you a non-modal popup that dismisses automatically if you click on the board (actually at one time I think it just showed the message in the line where moves are shown, but that's too easy to miss), while tellusererror should give a modal popup that would have to be dismissed by clicking its [OK] button before you could do anything else.

I don't remember if that distinction is observed in both xboard and WinBoard 4.2.7 and haven't checked 4.4.x.  It might not be consistent between xboard and WinBoard -- at one point I remember that at least one of them did the wrong thing because I hadn't figured out how to make both modal and non-modal popups under both X and Windows.  I don't remember which case was missing or if I fixed it later.

tellusererror wasn't meant to be a fatal error that would make the engine exit, but it might be OK to redefine it that way.  You'd have to check if engine authors are using it for nonfatal errors.


Tim Mann <mann>
Group administrator
Thu 29 Oct 2009 07:58:14 AM UTC, original submission:  

Currently escape sequences in the messages an engine gives with commads like 'telluser' or 'tellusererror' are not recognized, and printed litteraly. As a consequence, engine authors are now dmanding new tell-like commands for popping up multi-line message boxes.

Is there any reason not to recognize escape sequences for LF and TAB in such messages? I would highly prefer that solution over adding (and implementing) new tell*** commands. I recently noted that XBoard, unlke WinBoard did not even recognize '\n' as LF in a user-supplied InitString, so that xboard -firstInitString "new\nrandom\n" actually failed to start the engine! This is fixed now, but it would be easy to make the same routine that expands the escapes act on the messages passed by 'telluser' and 'tellusererror' before displaying them.

H.G. Muller

P.S. what is the intended difference between 'telluser' and 'tellusererror' anyway? Would it be safe to say (and put it in the protocol specs) that using 'tellusererror' allows the engine then to exit without waiting for 'quit'? Currently the user gets a double error popup if that happens, one from the engine, which is then eclipsed by a more cryptic one from XBoard (like "engine xxx exited unexpectedly: broken pipe").

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by apersaud (Updated the item)
  • -email is unavailable- added by mann (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-02-09 apersaud StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code