|
From: | Brian Tiffin |
Subject: | Re: [open-cobol-list] Simulating radio buttons. |
Date: | Sat, 12 Jul 2014 12:16:21 -0400 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0 SeaMonkey/2.26.1 |
john Culleton wrote:
The facility for creating screens,receiving data etc. has one glaring deficiency. There is no facility for radio buttons. Has anyone come up with a clever way to simulate them? I know one can put a number in a field and test that number/lettter on exit but I am looking for something more spiffy. Python uses Tkinter which in turn feeds off of the TK part of Tcl//Tk. Tiny Cobol has an assembly language bridge to Tcl/Tk also. Just wondering.
John,What timing. The interactive periodic table uses simple GTK buttons, but actual radio buttons would be very similar code.
http://sourceforge.net/p/open-cobol/discussion/cobol/thread/f83b59cb/Of course that's not a terminal application, but a full on gui screen. But, mentioned it here as, except for a few edge cases, GNU Cobol has direct access to GTK. Direct from COBOL sources, making GTK screen programming as easy (and as hard) as it is in C.
I'm finding that native X11 (and Windows umm, whatever the API is called) to be just as accessible.
Rildo's Tcl/Tk layer worked (out-of-the-box) with GNU Cobol. http://opencobol.add1tocobol.com/gnucobol/#can-gnu-cobol-interface-with-tcl-tk
I think GNU Cobol will get embedded Jim too, a small footprint Tcl reimplementation (no Tk as of yet). http://opencobol.add1tocobol.com/gnucobol/#can-gnu-cobol-interface-with-jim-tcl
We can do Python too, but I'll admit to failing importing IPython during the experiments, so the bindings will need some work.
http://opencobol.add1tocobol.com/gnucobol/#does-gnu-cobol-interface-with-pythonThen, there is Warren Gay's CobCurses; written before Roger added SCREEN section. Warren did a pretty extensive job, but I'm not sure if it includes radio-button ish modes or not. http://sourceforge.net/projects/cobcurses
It might be cool to try and link in with "dialog" type libraries as well. Quoted dialog, as it is a shell command for fancy box and line terminal graphics. http://invisible-island.net/dialog/manpage/dialog.html
There are a few systems like dialog; zenity, xdialog etc.Oh, and Federico's guicobol preprocessor is worth looking at as well; http://sourceforge.net/projects/guicobol
Spoilt for choice John (oh, but you might notice how I didn't actually answer the question of emulating radio buttons with SCREEN though)
;-) Cheers, Brian
[Prev in Thread] | Current Thread | [Next in Thread] |