PGN reader

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: PGN reader

Post by Michael Sherwin »

Harald wrote:
Michael Sherwin wrote:Why Qt or WxWidgets? Why not a Microsoft Visual product or Borlands free C++ Builder?
How do you know that his OS is Windows?
Well, I don't know. But, I admit that I am not really concerned about his needs nearly as much as I am concerned about mine! :D
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: PGN reader

Post by Michael Sherwin »

wgarvin wrote:
Michael Sherwin wrote:I do not have the time and energy to throw darts to find a decently good (for me) GUI language. I just want something simple, fast enough, focused, reasonably small and well documented with lots of examples. If there are good 3rd party books written about it, then all the better.

Given my needs, what is best for me? :?
Another option is to download the free version of Microsoft Visual C# Express Edition and write the GUI in C#. WinForms is far easier to use than anything from the win32 days. Its not "portable" (or at least I have no idea what level of support Mono has for it), but with GUI toolkits you can usually have at most two out of three: portable, simple and useful. WinForms is simple and useful (as opposed to Qt and wx which are portable and useful, or something like TCL which is portable and simple...)

Someone with some knowledge of C# and WinForms could build a functional GUI app with a bunch of buttons, menus, widgets etc. in less than an hour. Someone who's never used it before could probably do the same in a few hours. The designer lets you drag and drop widgets where you want them, and edit all of their properties. It generates C# code for them so that you can access them programmatically. It helps you create methods to handle the various events from the widgets that you're interested in, and you can then put whatever code you want into them.
Interesting. What is missing from TCL that would be needed for a chess interface? Or, in general, why is it not useful?
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: PGN reader

Post by Michael Sherwin »

smrf wrote:
Michael Sherwin wrote:Given my needs, what is best for me? :?
The free C++ Builder (Turbo C++) seems no longer to be available this days. It has been welcomed, that its created releases mostly seem to work fine also under Linux/Wine or MacOSX/Crossover. My SMIRF GUI with its multivariant engine might be a working example for that. Anyway, it always would make sense when developing on MS Windows systems also to check out, how to make the created solution work under Wine / Crossover, too.


I guess that in the short to medium term it is best to go with something that is current. For the long term it probably does not matter as everything seems to disappear.
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 7:45 pm
Location: Finland

Re: PGN reader

Post by ilari »

Michael Sherwin wrote:Why Qt or WxWidgets? Why not a Microsoft Visual product or Borlands free C++ Builder?
Because the Qt framework is supported on many platforms, optimized, has a more elegant design and extensive class library than anything from MS or Borland, and is just very efficient to work with.
Qt is humongous, which stops me dead in my tracks, when I see something that is 100's of megabytes in size.
The Qt SDK is only "humongous" (over 100MB) only to developers who must have the whole framework installed. But the same is true for Visual Studio, so what's your point? Qt for the end-user is not big at all, because usually only a small set of the library must be linked to, maybe a few megabytes on average.
DirectX is also huge but it is a very focused product with many books available that show how to do 2D graphics very simply. I could put up a chessboard in a windowed environment in which the pieces could be moved, in probably a long day.
Same thing for Qt - it has an awesome animation framework, easy-to-use OpenGL support, QGraphicsView for creating things like a graphical chessboard, and many books have been written about it.
I do not have the time and energy to throw darts to find a decently good (for me) GUI language.
If you don't have time for that then you definitely don't have time to write a decent chess GUI in any language. Besides, it's not about the language, you can write Qt apps in quite a few languages: http://en.wikipedia.org/wiki/Qt_%28fram ... 9#Bindings
I just want something simple, fast enough, focused, reasonably small and well documented with lots of examples. If there are good 3rd party books written about it, then all the better.
That's Qt you're describing, again!
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: PGN reader

Post by Michael Sherwin »

If I find a good book on Qt that can get me started quickly then I will give it a try.

Thanks!
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
wgarvin
Posts: 838
Joined: Thu Jul 05, 2007 5:03 pm
Location: British Columbia, Canada

Re: PGN reader

Post by wgarvin »

Michael Sherwin wrote: Interesting. What is missing from TCL that would be needed for a chess interface? Or, in general, why is it not useful?
I'm not a Tcl/Tk user so I can't really answer this. I've never heard of it being used for anything other than toy applications, or ugly applications. If you do try it out, I'd be interested to hear how it works out.

Meanwhile, in the spirit of general bashing, here is a page collecting negative quotes about Tcl (the language, not the GUI package Tk): http://wiki.tcl.tk/640

e.g. Rob Kudla is quoted as having said about it: "Ugly code and ugly 1980's style Motif-like interfaces are what I think of when I think Tcl". My own vague impression (left over from many years ago) matches his. However, he's the only guy quoted on that page who actually used the word "ugly". I guess YMMV.


[Edit: I guess I should clarify, that I dislike nearly all existing GUI toolkits I've ever heard of, though to varying degrees. Most of them are complex, quirky, hard to write portable GUIs with, hard to do decent layout in, etc. Many are big heavy frameworky things that feel kind of heavy when you're just trying to whip up a simple little app. But I guess once you get used to a big toolkit, little apps become easy to write with it. That might be what has happened with me and WinForms -- at work I make changes to a large IDE-like app which uses a lot of WinForms for its GUI, and I've written a couple smaller GUI utilities with it, so I've sort of gotten used to it -- at least the simple stuff. WinForms makes it very easy to do the simple stuff, which is more than can be said of raw win32 for example. I haven't invested the learning effort in either wxWidgets or Qt to get the same level of familiarity with them. For Java, I always liked SWT and hated Swing. If you really want to blow your mind, learn about immediate-mode GUIs...]
jwes
Posts: 778
Joined: Sat Jul 01, 2006 7:11 am

Re: PGN reader

Post by jwes »

Michael Sherwin wrote:Interesting. What is missing from TCL that would be needed for a chess interface? Or, in general, why is it not useful?
The SCID gui is written in tcl/tk. The TCL language feels old-fashioned to me, but I have only used it a little.
wgarvin
Posts: 838
Joined: Thu Jul 05, 2007 5:03 pm
Location: British Columbia, Canada

Re: PGN reader

Post by wgarvin »

jwes wrote:The SCID gui is written in tcl/tk. The TCL language feels old-fashioned to me, but I have only used it a little.
I rest my case.
User avatar
Zach Wegner
Posts: 1922
Joined: Thu Mar 09, 2006 12:51 am
Location: Earth

Re: PGN reader

Post by Zach Wegner »

PyGTK is the shit.
User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 7:45 pm
Location: Finland

Re: PGN reader

Post by ilari »

Michael Sherwin wrote:If I find a good book on Qt that can get me started quickly then I will give it a try.

Thanks!
There are plenty of them: http://qt.nokia.com/developer/books
I have The Book of Qt 4, and found it to be excellent.

The official book is even available for free in PDF format: http://www.qtrac.eu/C++-GUI-Programming ... 1st-ed.zip