[ghemical-devel] news update; part II

Tommi Hassinen thassine@messi.uku.fi
Thu, 17 Oct 2002 17:15:16 +0300 (WET)


Hi again.

In order to fix the remaining console input problems, I have just added a
new "Command Interpreter" thing to the GUI (both branches again).

The "Command Interpreter" is a dialog box, like this:

	+---------------------------------------+
	|    < text input field >		|
	+---------------------------------------+
	|    Ok-button       |  Cancel-button   |
	+---------------------------------------+

So the simple idea is that using this dialog, the user can type simple
command strings like "add light" etc that are processed. The initial
version of the interpreter now can understand two commands:

	1) "help"
	2) "add light"

In the popup-menu(s) there is a new item "Enter a Command..." that will
open the dialog.

Well, at first sight, this does not seem very useful. But I think the most
powerful way to use the interpreter is to use it with the popup-menu; now
selecting "Render/Lights/Create New Light" will no longer ask any
questions through the UNIX console, but it instead pops out a new Command
Interpreter dialog, with a _default_ command string that will add the
simplest light object once the user accepts the command string by clicking
the "Ok" button. So, the user didn't have to use the UNIX console anymore,
which is exactly the desing goal of this system.

Ok, probably just writing nice and shiny dialog boxes would be better than
using these commands, but the problem is that dialogs are expensive to
write (in terms of time). The "add light" is just one of about dozen cases
where UNIX console still is used, but using the command box it was very
quickly moved under the GUI.

Ok, I'll take this quick route away from console, and keep converting the
"cin >> " stuff into these commands (so that a useful default command
string could be show to the user in each case). Later, if we have time and
interest, we still can convert them into more user-friendly dialogs.

Regards,

	Tommi